
--- Wolfgang Jeltsch
Hi,
meanwhile, I'm not sure if I need lazyness in my concrete example. But the general point is the following:
I have functions for converting values of certain data types to strings. I don't use [Char] but Seq Char as the result type of these functions to allow for efficient concatenation. For one concrete type I want to test if the values of this type have a certain property.
I use the to-string conversion function to check for this property because a value has the property in question iff the first character of the string representation is a letter. So I want to do something like isAlpha $ head $ toString value. toString value is constructed by multiple applications of append, so it may in the end be something like append (append a (append b c)) (append (append d e) f). In this example I'd want the terms append b c and append (append d e) f) to not be evaluated at all.
Ok, I think was mistaken in this respect. The current version behaves ok for sequences mainly constructed with fromList, cons or snoc; a sequence made up of 'append' is strict. Cheers, JP. __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover