Reputation: 6300
JS:
func(a, 'b', function(e, obj) {
//does some stuff
}.another_func(obj));
My Coffee:
func(a, 'b', (e, obj) ->
#does some stuff
.another_func(obj)
but this doesn't seem to work.
Upvotes: 0
Views: 45
Reputation: 664538
Wrap the function in explicit parenthesis:
func a, "b", ((e, obj) ->
#does some stuff
).another_func obj
(or, with explicit method invocation):
func(a, "b", ((e, obj) ->
#does some stuff
).another_func(obj))
Upvotes: 2