Chapter Recap
What was new in this chapter?
Creating Procs with
lambdaUsing Procs as arguments to methods
Using blocks as arguments to methods, including your own new methods
Using Procs as first-class functions
The
inspectmethodNesting
lambdas within otherlambdasProc.newThe
yieldmethod
I have a confession to make. I love object orientation for many programming tasks, but this chapter about Ruby’s functional heritage was the most fun to write so far. Functional programming has been respected in academia for decades, and it is starting to get some well-deserved attention from folks in the computer programming industry and others who are just curious about what it can do. Now that we know some functional programming techniques, let’s put them to use ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access