Version française
Home     About     Download     Resources     Contact us    
Browse thread
Pattern matching over lazy lists
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jon Harrop <jon@f...>
Subject: Pattern matching over lazy lists

What's the best way to do this?

I was thinking of forcing the first few elements of a lazy list before pattern 
matching and then looking for forced values in the lists as patterns but I 
don't think you can deconstruct a lazy value in a pattern match...

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
The OCaml Journal
http://www.ffconsultancy.com/products/ocaml_journal/?e