Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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