Skip to content

Instantly share code, notes, and snippets.

@agustingianni
Created May 29, 2018 13:04
Show Gist options
  • Save agustingianni/3ec69b74d60a827a09160d10d8b8d5b7 to your computer and use it in GitHub Desktop.
Save agustingianni/3ec69b74d60a827a09160d10d8b8d5b7 to your computer and use it in GitHub Desktop.
open String
open List
(* Give a string return a dictionary of the words and the amount of times they are used *)
let word_frequency string =
String.split_on_char ' ' string
List.map print_endline (word_frequency "HOLA PEPE")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment