- Jun 1, 2002Hello!
I'm writimg a function to build a list from a file with more than
I've tried with something like:
let rec pmatch inp path =
let s= try
Str.string_after (input_line(inp)) 17
with End_of_file -> raise End
if Str.string_match (Str.regexp path) s 0
then begin [s] @ (pmatch inp path) end
(pmatch inp path)
It compiles perfectly, but when i ran it.. it gives me "stack
I know that ocamlc optimizes tail recursive calls, but i didn't
understand very well its mechanism..
Does anyone know how can i rewrite the function in a tail-recursive
- Next post in topic >>