summaryrefslogtreecommitdiff
path: root/1-10/7.hs
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2017-05-28 18:19:31 -0400
committerDeterminant <ted.sybil@gmail.com>2017-05-28 18:19:31 -0400
commitafae39a832fbdf0f5bf67e20cac7bdf224b0a290 (patch)
tree34e472ec0de24fab26e064628025cb2ece798bc5 /1-10/7.hs
init
Diffstat (limited to '1-10/7.hs')
-rw-r--r--1-10/7.hs4
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