summaryrefslogtreecommitdiff
path: root/1-10/1.hs
diff options
context:
space:
mode:
Diffstat (limited to '1-10/1.hs')
-rw-r--r--1-10/1.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/1-10/1.hs b/1-10/1.hs
new file mode 100644
index 0000000..0d2f07a
--- /dev/null
+++ b/1-10/1.hs
@@ -0,0 +1,3 @@
+myLast [] = error "empty list"
+myLast [x] = x
+myLast (_:xs) = myLast xs