Last active
March 3, 2020 04:30
-
-
Save crutchcorn/98a238af55b96c77cad3480aaed1444e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fn(arg) { | |
return arg("Hello, world"); | |
} | |
const passThru = fn(arg => funct => funct(arg)); | |
passThru(console.log); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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