Skip to content

Instantly share code, notes, and snippets.

@robotlolita
Last active December 17, 2015 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robotlolita/5608403 to your computer and use it in GitHub Desktop.
Save robotlolita/5608403 to your computer and use it in GitHub Desktop.
function fun(yes) {
return yes? { foo: 'hello'
, bar: false
, quux: 10
}
: /* otherwise */ { foo: 'hey'
, bar: true
, quux: 20
}
}
fun = (yes) ->
| yes => do
foo : 'hello'
bar : false
quux : 10
| otherwise => do
foo : 'hey'
bar : true
quux : 20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment