trying out new arrows for function literals -> is a function, => is a bound function

This commit is contained in:
Jeremy Ashkenas
2010-01-26 10:52:05 -05:00
parent 55df898112
commit a9f016e292
54 changed files with 259 additions and 259 deletions

View File

@@ -5,7 +5,7 @@ items: [1, 2, 3, "bacon", 4, 5]
for item in items
break if item is "bacon"
findit: (items) =>
findit: (items) ->
for item in items
return item if item is "bacon"
@@ -17,7 +17,7 @@ print findit(items) is "bacon"
obj: {
num: 5
func: =>
func: ->
this.result: if false
10
else