1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00
jashkenas--coffeescript/test/test_chained_calls.coffee

25 lines
408 B
CoffeeScript
Raw Normal View History

identity_wrap: (x) ->
-> x
result: identity_wrap(identity_wrap(true))()()
ok result, 'basic chained function calls'
str: 'god'
result: str.
split('').
reverse().
reverse().
reverse()
ok result.join('') is 'dog', 'chained accesses split on period/newline'
result: str
.split('')
.reverse()
.reverse()
.reverse()
ok result.join('') is 'dog', 'chained accesses split on newline/period'