Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] fib with lazy list
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: sebastien FURIC <sebastien.furic@t...>
Subject: Re: [Caml-list] fib with lazy list

 Sorry, a typo:

sebastien FURIC a écrit :
> 
>  The following code solves your problem:
> 
> type 'a llist = LList of 'a * 'a llist Lazy.t | Empty
> 
> let tl = function
>   | Empty -> failwith "tl: empty list"
>   | LList (_, xs) -> xs
    ^^^^^^^^^^^^^^^^^^^^^
    | LList (_, lxs) -> Lazy.force lxs

 Cheers,
 
 Sebastien.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners