Funktoren als Typklasse

class Functor f where
    fmap :: ( a -> b ) -> ( f a -> f b )

instance Functor [] where
    fmap = map

date Tree a 
    = Branch ( Tree a ) a ( Tree a )
    | Leaf

instance Functor Tree where ...



Johannes Waldmann 2010-01-25