summaryrefslogtreecommitdiffhomepage
path: root/livescript.html.markdown
diff options
context:
space:
mode:
authorGeoff Liu <g@geoffliu.me>2015-01-18 13:07:39 -0700
committerGeoff Liu <g@geoffliu.me>2015-01-18 13:07:39 -0700
commit31faf1a6a1c35802cf3676ec1a7f54d86411b566 (patch)
tree5ccca54b8837fec9a8d6d60d2bda6db4162078e7 /livescript.html.markdown
parent40c38c125b94430b518d7e402d595694149b7c53 (diff)
parentc053f1559bb357d9e8ced2452096bf3a95cc7ddb (diff)
Merge branch 'master' of github.com:geoffliu/learnxinyminutes-docs
Diffstat (limited to 'livescript.html.markdown')
-rw-r--r--livescript.html.markdown8
1 files changed, 4 insertions, 4 deletions
diff --git a/livescript.html.markdown b/livescript.html.markdown
index 429b91cb..e64f7719 100644
--- a/livescript.html.markdown
+++ b/livescript.html.markdown
@@ -219,8 +219,8 @@ identity 1 # => 1
# Operators are not functions in LiveScript, but you can easily turn
# them into one! Enter the operator sectioning:
-divide-by-2 = (/ 2)
-[2, 4, 8, 16].map(divide-by-2) .reduce (+)
+divide-by-two = (/ 2)
+[2, 4, 8, 16].map(divide-by-two) .reduce (+)
# Not only of function application lives LiveScript, as in any good
@@ -248,8 +248,8 @@ reduce = (f, xs, initial) --> xs.reduce f, initial
# The underscore is also used in regular partial application, which you
# can use for any function:
div = (left, right) -> left / right
-div-by-2 = div _, 2
-div-by-2 4 # => 2
+div-by-two = div _, 2
+div-by-two 4 # => 2
# Last, but not least, LiveScript has back-calls, which might help