Hi all,

Op Thursday 10 July 2008 12:16:25 schreef Grzegorz Chrupala:
> Is there a less ugly way of avoiding laziness in the code pasted below then
> the use of seq in the last line?
You could replace the list dfs' with a strict list type, like:

data StrictList  a = Cons !a !(StrictList a) | Nil

Then you wouldn't have to make useless calls to sum and seq to force 
strictness. It would be more work though because you'd have to define your 
own higher order functions to work with the strict list.

Reinier

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to