tmap :: (a -> b) -> Tree a -> Tree b
tmap f Leaf = Leaf
tmap f ( n @ Node {} ) =
Node { key = f ( key n )
, left = tmap f ( left n )
, right = tmap f ( right n )
}
wieder gilt:
tmap f . tmap g = tmap (f . g)
tmap durch tfold
tfold l n . map f = tfold ?? ??
welche Bedeutung für Programmtransformationen?