summaryrefslogtreecommitdiffhomepage
path: root/livescript.html.markdown
diff options
context:
space:
mode:
authorElena Bolshakova <lena-san@yandex-team.ru>2015-06-10 11:34:14 +0300
committerElena Bolshakova <lena-san@yandex-team.ru>2015-06-10 11:34:14 +0300
commit193f66553fc114e83e7c4cfb4607e4a1b57c4f09 (patch)
tree30988e25d31ed6dff83cf409ad093c3c7ec9322c /livescript.html.markdown
parent676568cca8731d0dbb2d2bdeff08cc092d283177 (diff)
parent5086480a04d27cff2380f04609210082000538d4 (diff)
Merge branch 'master' of https://github.com/adambard/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