4 ms·
While I agree with your points, doSomething () -> 'hello' just isn't valid code. Is valid code. Not that you'd ever actually want to use it: coffee>
by mnutt 14y ago
While I agree with your points,
doSomething () -> 'hello' just isn't valid code.
Is valid code. Not that you'd ever actually want to use it:
coffee> doSomething = (fn) -> if fn then fn() else (-> 'hi')
doSomething = (fn) -> if fn then fn() else (-> 'hi')
[Function]
coffee> doSomething() -> 'hello'
doSomething() -> 'hello'
'hi'
coffee> doSomething () -> 'hello'
doSomething () -> 'hello'
'hello'