summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--haskell.html.markdown6
-rw-r--r--perl6.html.markdown2
2 files changed, 4 insertions, 4 deletions
diff --git a/haskell.html.markdown b/haskell.html.markdown
index 52433aaa..79fbf09f 100644
--- a/haskell.html.markdown
+++ b/haskell.html.markdown
@@ -80,6 +80,9 @@ not False -- True
[5..1] -- This doesn't work because Haskell defaults to incrementing.
[5,4..1] -- [5, 4, 3, 2, 1]
+-- indexing into a list
+[0..] !! 5 -- 5
+
-- You can also have infinite lists in Haskell!
[1..] -- a list of all the natural numbers
@@ -99,9 +102,6 @@ not False -- True
-- adding to the head of a list
0:[1..5] -- [0, 1, 2, 3, 4, 5]
--- indexing into a list
-[0..] !! 5 -- 5
-
-- more list operations
head [1..5] -- 1
tail [1..5] -- [2, 3, 4, 5]
diff --git a/perl6.html.markdown b/perl6.html.markdown
index 3f1cab2e..85ab1d79 100644
--- a/perl6.html.markdown
+++ b/perl6.html.markdown
@@ -283,7 +283,7 @@ for @array -> $variable {
}
# As we saw with given, for's default "current iteration" variable is `$_`.
-# That means you can use `when` in a `for` just like you were in a when.
+# That means you can use `when` in a `for` just like you were in a `given`.
for @array {
say "I've got $_";