Derived Instances
data Tree a = Node a (Tree a) (Tree a) | Leaf
deriving Show
Constructs a “default
instance” of class Show.
Main> show (Node 1 Leaf (Node 2 Leaf Leaf))
"Node 1 Leaf (Node 2 Leaf Leaf)"
Works for many standard classes.
Föregående bild
Nästa bild
Tillbaka till första bilden
Visa grafisk version