Skip to content

Instantly share code, notes, and snippets.

@nishio
Created July 15, 2010 07:50
Show Gist options
  • Save nishio/476638 to your computer and use it in GitHub Desktop.
Save nishio/476638 to your computer and use it in GitHub Desktop.
let str_to_list (src : string) : char list =
let rec _stol (src : string) (pos : int) (rest : char list) =
let c = get src pos in
if pos > 0 then
_stol src (pos - 1) (c :: rest)
else
c :: rest
in _stol src (length src - 1) []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment