Reputation: 357
I was wondering how to make a list such as
[1;2;3;4]
and turn it into
[[1];[2];[3];[4]]
I was thinking of using List.init but that didn't work
Upvotes: 3
Views: 136
Reputation: 12691
[1;2;3;4] |> List.map (fun i -> [i])
Upvotes: 11