Bedarfsauswertung in Haskell

jeder Funktionsaufruf ist lazy:

data N = Z | S N
positive :: N ->  Bool
positive n = case n of 
    Z -> False ; S {} -> True
x = S ( error "err" )
positive x



Johannes Waldmann 2010-01-25