
10 Nov
2005
10 Nov
'05
4:53 a.m.
Hello Yitzchak, Thursday, November 10, 2005, 11:59:49 AM, you wrote: YG> How about a Strict and Strict Updatable version for YG> each collection type? btw, strict and non-strict version of the same routines can be generated with help of classes: data Tree a = Tree (Tree a) a (Tree a) | Empty data StrictTree a = StrictTree !(StrictTree a) !a !(StrictTree a) | StrictEmpty class Trees t a where left, right, isEmpty.... instance Trees Tree where left (Tree l e r) = l ... instance Trees StrictTree where left (StrictTree l e r) = l ... and all other operations can be implemented in terms of left/right/... -- Best regards, Bulat mailto:bulatz@HotPOP.com