I am trying to convert strings to floats and find their sum:
> String.split "," "0.2,0.3,3.1"
> List.map String.toFloat ["0.2","0.3","3.1"]
> List.sum [Just 0.2,Just 0.3,Just 3.1]
But I'm getting these compiler messages:
This argument is a list of type:
List (Maybe Float)
But `sum` needs the 1st argument to be:
List number
Hint: Use Maybe.withDefault to handle possible errors. Longer term, it is
usually better to write out the full `case` though!
How can I get the sum of these values?