writeString (Node "Haskell " (Leaf '9') (Leaf '8')) Praefix == "Haskell 98" writeString (Node "Haskell " (Leaf '9') (Leaf '8')) Infix == "9Haskell 8" replace (BNode 5 Nil Nil) 42 Postfix Nil == (BNode 5 Nil Nil) replace (BNode 5 Nil Nil) 5 Infix (BNode 6 (BNode 3 Nil Nil) Nil) == (BNode 6 (BNode 3 Nil Nil) Nil) replaceSubTree (CNode 5 (CLeaf 2) (CLeaf 3)) (CNode 6 (CNode 3 (CLeaf 2) (CLeaf 3))(CLeaf 1)) GspInfix == (CNode 5 (CLeaf 2) (CLeaf 3)) replaceSubTree (CNode 17 (CNode 5 (CLeaf 2) (CLeaf 3)) (CLeaf 1)) (CNode 5 (CLeaf 2) (CLeaf 3)) Infix == (CNode 17 (CLeaf 10) (CLeaf 1)) paths (Graph [(1,[2,3,4])]) 2 3 == NoWay paths (Graph [(1,[2,4]),(2,[3])]) 1 3 == OneWay