
20 Feb
2008
20 Feb
'08
11:53 p.m.
G'day all.
Quoting Cetin Sert
It is astonishing to see that your version actually performs the worst (at least on my machine).
On your example, I'm not surprised:
plong 0 = Var 0 plong n | even n = Or (Var n) (plong (n-1)) | otherwise = And (Var n) (plong (n-1))
This is effectively a singly linked list. I would expect my (well, I didn't invent it) to work better on something that didn't have this unique structure, such as: test 0 = Var 0 test n | even n = Or (Var n) (test (n-1)) | otherwise = And (test (n-1)) (Var n) Cheers, Andrew Bromage