summaryrefslogtreecommitdiffhomepage
path: root/elm.html.markdown
diff options
context:
space:
mode:
authorMax Goldstein <maxgoldstein1@gmail.com>2015-12-13 13:35:17 -0500
committerMax Goldstein <maxgoldstein1@gmail.com>2015-12-13 13:35:17 -0500
commitac2bff249e8f5ead3a5e791170430a86aaaa68cf (patch)
tree391a42d93b7494f465cad26834ef4eebb82aec71 /elm.html.markdown
parent4aca8f16dfec1a9341648b0ff1724ada01cdc2b0 (diff)
parentfb4f346686e49658d3d74f6656b20138649cfedd (diff)
Merge branch 'we-build-dreams/patch-1' into elm/en2
Diffstat (limited to 'elm.html.markdown')
-rw-r--r--elm.html.markdown10
1 files changed, 5 insertions, 5 deletions
diff --git a/elm.html.markdown b/elm.html.markdown
index 67a0006d..f395e85b 100644
--- a/elm.html.markdown
+++ b/elm.html.markdown
@@ -76,13 +76,13 @@ snd ("elm", 42) -- 42
-- Records are like tuples but the fields have names. The order of fields
-- doesn't matter. Notice that record values use equals signs, not colons.
-{ x = 3, y = 7}
+{ x = 3, y = 7 }
-- Access a field with a dot and the field name.
-{ x = 3, y = 7}.x -- 3
+{ x = 3, y = 7 }.x -- 3
-- Or with an accessor fuction, which is a dot and the field name on its own.
-.y { x = 3, y = 7} -- 7
+.y { x = 3, y = 7 } -- 7
-- Update the fields of a record. (It must have the fields already.)
{ person |
@@ -131,7 +131,7 @@ case List.head aList of
multiply a b =
a * b
--- Apply (call) a function by passing it arguments (no commas necessay).
+-- Apply (call) a function by passing it arguments (no commas necessary).
multiply 7 6 -- 42
-- Partially apply a function by passing only some of its arguments.
@@ -173,7 +173,7 @@ fib n =
else
fib (n - 1) + fib (n - 2)
-List.map fib [0..8] -- [1, 1, 2, 3, 5, 8,13, 21, 34]
+List.map fib [0..8] -- [1, 1, 2, 3, 5, 8, 13, 21, 34]
-- Another recursive function (use List.length in real code).
listLength aList =