Rekursive Stream-Definitionen

naturals = 0 : map succ naturals

fibonacci = 0 
    : 1 
    : zipWith (+) fibonacci ( tail fibonacci )

bin = False 
    : True 
    : concat ( map ( \ x -> [ x, not x ] ) 
                   ( tail bin ) )
√úbungen:
concat = foldr ...
map f  = foldr ...



Johannes Waldmann 2011-01-18