Execute Brain****/OCaml: Difference between revisions
Content added Content deleted
(New page: {{implementation|Brainf***}}{{collection|RCBF}}Category:OCaml Quick implementation of a Brainfuck interpreter in OCaml. Like the Haskell version but without the lazy lists: Pairs...) |
mNo edit summary |
||
Line 83: | Line 83: | ||
# let char_list_of_string s = |
# let char_list_of_string s = |
||
let result |
let result = ref [] in |
||
String.iter (fun c -> result := c :: !result) s; |
String.iter (fun c -> result := c :: !result) s; |
||
List.rev !result;; |
List.rev !result;; |