Problem 68b Solutions

Solutions

inorder : Tree a -> List a
inorder tree =
    case tree of
        Empty ->
            []

        Node v l r ->
            (inorder l) ++ (inorder r) ++ [v]

Back to problem

results matching ""

    No results matching ""