
10 Jul
2008
10 Jul
'08
6:48 a.m.
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