Problem 7 Solution

Solution

flatten : NestedList a -> List a
flatten nl =
    case nl of
        Elem x ->
            [ x ]

        SubList sl ->
            List.concatMap flatten sl

Back to Problem

results matching ""

    No results matching ""