Created
November 2, 2017 00:36
-
-
Save carld/179192f49c8b07cf973ff7f118ef03ce to your computer and use it in GitHub Desktop.
anonymous lambda to call a pipeline of lambdas
This file contains hidden or 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
run = ->(p) do | |
f, *r = p | |
f.call(->() { run.call(r) } , ->() { false }) if f | |
end | |
run.call [ ->(s,e){puts "Hello"; s.call} , | |
->(s,e){puts "World";s.call} ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment