August 09, 2017
Blocks, procs, and lambdas, oh my! If you've used Ruby, you've seen these constructs, and maybe even used them. Learn how to fully use these elegant tools with Mastering Ruby Closures, now available in print and ebook from pragprog.com/book/btrubyclo.
Last week we announced that the hugely popular A Common-Sense Guide to Data Structures and Algorithms was in print and shipping, however, due to a small data hiccup, it wasn't actually available for you to order in print last week! We've fixed that, and you can now order the print edition for your collection from pragprog.com/book/jwdsal.
Come and get it today!
Mastering Ruby Closures: A Guide to Blocks, Procs, and Lambdas
Ruby developers use the Ruby language as the yardstick for expressivity, flexibility, and elegance—and a large part of this is due to blocks, lambdas, and procs. These language features make Ruby one of the most beautiful and pleasant languages to work with. Learn how to understand and craft code that will take you closer to Ruby mastery.
Start with the basics of closures and then dive into blocks, as you learn about the patterns that involve blocks, and how they are used in real-world code. Then create and use procs and lambdas. Finally, build your own lazy enumerables with advanced Ruby features such as fibers and generators. Along the way, work with computer science concepts such as closures, free variables and first-class functions. Spot a closure easily. Identify the patterns where you can effectively use blocks and re-implement common standard library methods using them. Trace through how Symbol#to_proc works and find out the different ways of calling procs. This succinct guide takes you through the different kinds of Ruby closures with engaging examples, and each chapter comes with exercises that test and challenge your understanding.
When you finish this book, blocks, procs, and lambdas will have become an integral part of your Ruby toolbox.
Now available in print and ebook from pragprog.com/book/btrubyclo.
Upcoming Author Appearances
Did You Know?
Don't Get Left Out
Are your friends jealous that you get these spiffy email newsletters and they don't? Clue them in that all they need to do is create an account on pragprog.com (email address and password is all it takes) and select the checkbox to receive newsletters.
Are you following us on Twitter and/or Facebook? Here's where you can find us and keep up with the latest news and commentary, and occasional discounts:
Tell your friends! Tweet this
- Learn Functional Programming with Elixir: New Foundations for a New World
- Release It! Second Edition: Design and Deploy Production-Ready Software
- React for Real (exPress)
- Craft GraphQL APIs in Elixir with Absinthe
- A Common-Sense Guide to Data Structures and Algorithms
- Functional Programming: A PragPub Anthology
- Create Your Successful Agile Project
- Scalable Cloud Ops with Fugue
Thanks for your continued support,
Publisher, Pragmatic Bookshelf
Books • eBooks • PragPub Magazine • Audiobooks and Screencasts