Advertisement
Guest User

Untitled

a guest
Oct 1st, 2015
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.17 KB | None | 0 0
  1. let chars = ['a'; 'b'; 'c'; 'a'; 'd'];
  2. let hist = chars
  3.         |> Seq.groupBy (fun x -> x)
  4.         |> Seq.map (fun (x, y) -> (x,  y |> Seq.fold (fun acc _ -> acc + 1) 0))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement