Skip to content

Instantly share code, notes, and snippets.

@joshgoebel
Forked from anonymous/pipeline.rb
Created November 13, 2016 17:45
Show Gist options
  • Save joshgoebel/60371786d44875906e299c7ff64c0a2a to your computer and use it in GitHub Desktop.
Save joshgoebel/60371786d44875906e299c7ff64c0a2a to your computer and use it in GitHub Desktop.
r = pipeline(3) \
| :dec \
| [:add, 2] \
| [:mul, 5] \
| :double
puts r.value
r = pipeline(3) do
dec
add(2)
mul(5)
double
end
puts r
r = pipeline(3)
.dec
.add(2)
.mul(5)
.double
.value
puts r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment