Last active
August 8, 2020 00:06
-
-
Save tangentus/a1cebbf48ccee225c701d1b0cfe7d5b0 to your computer and use it in GitHub Desktop.
A methodology for currying
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
anchor = proc do |a| | |
proc {|b| "#{a} #{b}" } | |
end | |
append = proc {|p| p.call("b")} | |
(anchor >> append).call("a") | |
anchor.call("a").call("b") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment