views:

59

answers:

1

I've got a function which takes an input of type

('a * (float * 'b * float)) list

Where I'd obviously like to avoid having to explicitly include the type.

The problem is that I convert the second float to decimal, using the decimal function.

let v2 (_,(_,_,v)) = decimal v

So type inference defaults to seeing this:

('a * (float * 'b * int)) list

Is there anything clever I can do to avoid having to explicitly include the type signature of the function?

+1  A: 

Is there something wrong with doing it like this?

let v2 (_,(_,_,v:float)) = decimal v
kvb
No. I had a brain fart and tried `let v2 (_,(_,_,float:v)) = decimal v`, then gave up and came here, must be the lack of sleep. Thanks.
Benjol