Skip to content

Instantly share code, notes, and snippets.

@fwg
Created July 7, 2013 11:23
Show Gist options
  • Save fwg/5943185 to your computer and use it in GitHub Desktop.
Save fwg/5943185 to your computer and use it in GitHub Desktop.
let f(h as (Number) -> Number, x as Number)
// h should take a parameter. it does not, but who cares.
let v = h(x)
// now v should be a Number, right?
// because we told GorillaScript up there, of course it can optimize this condition away
if (typeof v == "number" or v instanceof Number)
v / 1.23
let g()
let x = 42
if (x <= 2)
1
else
{wat: "wat"}
alert(f(g, 2)) // NaN, obviously.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment