G'day all.

Quoting Cetin Sert <[EMAIL PROTECTED]>:

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
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to