Skip to content

Instantly share code, notes, and snippets.

@Gwash3189
Last active August 29, 2015 14:06
Show Gist options
  • Save Gwash3189/9b0ba2ff451d8a6150b0 to your computer and use it in GitHub Desktop.
Save Gwash3189/9b0ba2ff451d8a6150b0 to your computer and use it in GitHub Desktop.
Count occurrences of the starting character in a sequence.
let createGroupings lineSeq =
lineSeq |> Seq.map (fun element -> element.[0])
|> Seq.countBy id
|> Seq.toList
let list = ["asd"; "dsa"]
createGroupings list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment