summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam Bard <github@adambard.com>2013-07-01 08:43:40 -0700
committerAdam Bard <github@adambard.com>2013-07-01 08:43:40 -0700
commit75d86ed0dd78e9c60c777e1ef98d681c251464b7 (patch)
tree68a824988bc897871cb801e3027e0e01685df858
parentadaf4908a08da43006e7ad1074ccc50435e095fb (diff)
parent9b6c837916dc50a4646ae1666528681e6e4a881c (diff)
Merge pull request #76 from lubomir/patch-1
Remove mentions of array
-rw-r--r--haskell.html.markdown6
1 files changed, 3 insertions, 3 deletions
diff --git a/haskell.html.markdown b/haskell.html.markdown
index 134ea2a9..1a4cdc67 100644
--- a/haskell.html.markdown
+++ b/haskell.html.markdown
@@ -152,8 +152,8 @@ fib x = fib (x - 1) + fib (x - 2)
-- Pattern matching on tuples:
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
+-- Pattern matching on lists. Here `x` is the first element
+-- in the list, and `xs` is the rest of the list. We can write
-- our own map function:
myMap func [] = []
myMap func (x:xs) = func x:(myMap func xs)
@@ -164,7 +164,7 @@ myMap (\x -> x + 2) [1..5] -- [3, 4, 5, 6, 7]
-- using fold (called `inject` in some languages) with an anonymous
-- function. foldl1 means fold left, and use the first value in the
--- array as the initial value for the accumulator.
+-- list as the initial value for the accumulator.
foldl1 (\acc x -> acc + x) [1..5] -- 15
----------------------------------------------------