From edcc6ba8ca9d6b883b59548eb8bb5e312c73f43b Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Thu, 29 Jan 2015 15:56:05 +0800 Subject: p1 --- p1.hs | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 p1.hs diff --git a/p1.hs b/p1.hs new file mode 100644 index 0000000..3afd512 --- /dev/null +++ b/p1.hs @@ -0,0 +1,5 @@ + +myLast :: [a] -> a +myLast [] = error "Empty List" +myLast [x] = x +myLast (x:xs) = myLast xs -- cgit v1.2.3-70-g09d2