Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
rainfall.fs
let rainfall = [[1.17;0.78];[1.24;3.22];[1.277;1.4]]
let months = [|"January";"February"|]
let rainfalStats = [ 0 .. months.Length - 1]
|> List.map
(
fun index ->
(
months.[index],
rainfall |> List.map (fun row -> List.nth row index)
|> List.average
)
)
printfn "%A" rainfalStats
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment