diff options
author | Adam Bard <github@adambard.com> | 2014-12-24 10:38:16 +0100 |
---|---|---|
committer | Adam Bard <github@adambard.com> | 2014-12-24 10:38:16 +0100 |
commit | 4ab8d7427d60f48a5b076c0e589477a147659d31 (patch) | |
tree | b2892e8e8fe8a411ba678893a37f40e94a63847a /livescript.html.markdown | |
parent | 28fcbc8e1c7d22bbc192418b4f3513f2ca4ead3e (diff) |
Update livescript.html.markdown
Fix syntax errors on numbery var names
Diffstat (limited to 'livescript.html.markdown')
-rw-r--r-- | livescript.html.markdown | 8 |
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 |