-- Parallel evaluation tests. -- Sergio Antoy, Thu Mar 13 09:40:46 PDT 2008. -- Prompted by a message of S. Hanowski on the curry mailing list. data Token = Stop | Loop | Fail f Stop = Stop f Loop = f Loop g (a,b) = (f a, f b) theList = [Loop, Stop, Loop, Fail, Stop, Loop, Fail] mappedList = map f theList test1 = mappedList result1 = failed test2 = length mappedList result2 = 7 test3 = mappedList !! 4 result3 = Stop test4 = g (Loop, Fail) result4 = failed test5 = g (Fail, Loop) result5 = failed test6 = fst better ? snd better where better = g (Loop, Stop) result6 = Stop -- ? non-terminate (which can't be coded)