99-haskell-problems

commit 870f95074bbfd5de16a15e7e80b0a62cd4726fbc

tree

parent:
d7367934f46739ad276a6af12ea3c78d6713d1fe

Nick Mykins <nickmykins@transfix.io>

2018-01-25T11:52:33-05:00

change var name

diff --git a/99_problems.hs b/99_problems.hs
index 964ce2a8c7c28fa98d27420335e7b18f0856a1cd..3d1414edb8af318d943b2780802309baa61c2736 100644
--- a/99_problems.hs
+++ b/99_problems.hs
@@ -10,10 +10,10 @@
 
 -- 2. Write a function that returns the penultimate item in a list
 myButLast :: [a] -> a
-myButLast xs
+myButLast list
     | len < 2 = error "Too few elements!"
-    | otherwise = xs !! (len - 2)
-    where len = length xs
+    | otherwise = list !! (len - 2)
+    where len = length list
 
 
 -- 3. Implement `!!`