Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
OCaml: int_string to int List
# #load "str.cma";;
# List.map int_of_string (Str.split (Str.regexp "[^0-9]+") "1234");;
- : int list = [1234]
# List.map int_of_string (Str.split (Str.regexp "") "1234");;
- : int list = [1; 2; 3; 4]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.