Problem 68b Solutions

Solutions

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

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

Back to problem

results matching ""

    No results matching ""