Skip to content

Instantly share code, notes, and snippets.

@carld
Created November 2, 2017 00:36
Show Gist options
  • Save carld/179192f49c8b07cf973ff7f118ef03ce to your computer and use it in GitHub Desktop.
Save carld/179192f49c8b07cf973ff7f118ef03ce to your computer and use it in GitHub Desktop.
anonymous lambda to call a pipeline of lambdas
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