Skip to content

Instantly share code, notes, and snippets.

@crutchcorn
Last active March 3, 2020 04:30
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 crutchcorn/98a238af55b96c77cad3480aaed1444e to your computer and use it in GitHub Desktop.
Save crutchcorn/98a238af55b96c77cad3480aaed1444e to your computer and use it in GitHub Desktop.
function fn(arg) {
return arg("Hello, world");
}
const passThru = fn(arg => funct => funct(arg));
passThru(console.log);
def function(arg):
return arg("What on earth...")
passThru = function(lambda arg: lambda funct: funct(arg))
passThru(print)
r"""
@typedrat showed me this!
a = (λb.b "this")
c = a (λx.(λy.y x))
c = (λb.b "this") (λx.(λy.y x))
c = (λx.(λy.y x)) "this"
c = (λy.y "this")
c print
= (λy.y "this") print
= print "this"
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment