When importing numbers from a csv file, I need to convert them to floats with unit.
Currently I do this with an inline function:
data |> List.map
Is there any reason why you have to map twice? What's wrong with this:
data |> List.map (fun x -> (float x) * 1.0<m>)
It looks like units of measure can't be type parameters for the moment (no idea if this will change). So the shortest way to write this is:
data |> List.map float |> List.map ((*) 1.0<m>)
EDIT
See also now FloatWithMeasure
here
http://msdn.microsoft.com/en-us/library/ee806527(VS.100).aspx