Beispiel

import Test.QuickCheck

app :: [a] -> [a] -> [a]
app xs ys = case xs of
    []      -> ys
    x : xs' -> x : app xs' ys
assoc :: [Int] -> [Int] -> [Int] -> Bool
assoc xs ys zs = 
    app xs (app ys zs) == app (app xs ys) zs
main :: IO ()
main = quickCheck assoc


Johannes Waldmann 2011-01-18