summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--haskell.html.markdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/haskell.html.markdown b/haskell.html.markdown
index f3baa9a5..134ea2a9 100644
--- a/haskell.html.markdown
+++ b/haskell.html.markdown
@@ -155,7 +155,7 @@ foo (x, y) = (x + 1, y + 2)
-- Pattern matching on arrays. Here `x` is the first element
-- in the array, and `xs` is the rest of the array. We can write
-- our own map function:
-myMap func [x] = [func x]
+myMap func [] = []
myMap func (x:xs) = func x:(myMap func xs)
-- Anonymous functions are created with a backslash followed by