diff options
Diffstat (limited to '1-10/7.hs')
-rw-r--r-- | 1-10/7.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/1-10/7.hs b/1-10/7.hs new file mode 100644 index 0000000..0ebd030 --- /dev/null +++ b/1-10/7.hs @@ -0,0 +1,4 @@ +data NestedList a = Elem a | List [NestedList a] + +flatten (Elem x) = [x] +flatten (List xs) = concat $ map flatten xs |