Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let chars = ['a'; 'b'; 'c'; 'a'; 'd'];
- let hist = chars
- |> Seq.groupBy (fun x -> x)
- |> Seq.map (fun (x, y) -> (x, y |> Seq.fold (fun acc _ -> acc + 1) 0))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement