What’s in This Book

This book is broken into four parts. The first three parts get you comfortable with blocks, Procs, and lambdas, and the last part gives you some practice using those concepts.

In Chapter 1, Closing in on Closures, you’ll explore the basics of closures. This chapter lays the groundwork for the rest of the book.

In Chapter 2, Beautiful Blocks, you’ll dive into blocks, where you’ll start with the basics and build your very own implementations of Enumerable and Enumerator in Ruby. You’ll learn about the patterns that involve blocks and how they are used in real-world code.

In Chapter 3, The Power of Procs and Lambdas, you’ll learn how to create and use Procs and lambdas, and you’ll learn to appreciate the special relationship that blocks, Procs, and lambdas have with each other. Doing the exercises in this chapter will change how you write Ruby code.

Finally, in Chapter 4, Building Your Own Lazy Enumerables , you’ll put what you have learned into practice as you build a stripped-down (but working) version of lazy enumerables. Along the way, you will work with fibers, generators, and yielders. If that all seems intimidating or has left you scratching your head, don’t worry; by the time you get to this chapter, you’ll be well-prepared.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.14.245