What OCaml libraries are out there that provide lazy list handling? I am looking for something along these lines:
type 'a lazy_list = (*'*)
| Nil
| Cons of 'a * 'a lazy_list lazy_t
let from f =
let rec gen n =
lazy
(
match f n with
| Some x ->
Cons (x, gen (n + 1))
| None ->
Nil
)
in
gen 0
Integration with the Stream
type and syntactic sugar for backtracking Camlp4 parsers would be nice.