Unannounced and unmarked, blocks turn up all over Ruby programs. Their use ranges from some of Ruby's most basic structures, such as loops, to some of its most sophisticated tricks. Similar to closures or lambdas in other languages, blocks enable some of Ruby's vaunted efficiency. Blocks even allow other people to write some of the code you use.
With this excerpt from Head First Ruby, you'll learn about blocks by looking at each concept from different angles. Exercises throughout will help you understand and remember how these closure-like structures work. In fact, these exercises are key component to our unique, hands-on Head First approach.
- Bend your mind around blocks and methods
- Build blocks into larger structures
- Do heavy lifting easily with blocks
- Get more done with less code
This open book is licensed under a Creative Commons License (CC BY). You can download Using Blocks in Ruby ebook for free in PDF format (2.0 MB).
Thread-safe, reliable, and lightning-fast, Rust has been the most loved programming language on Stack Overflow for four years and counting! This open source systems language gets its amazing speed in large part from its memory safety - and without resource-greedy garbage collection. Offering freedom from a runtime requirement, a rich type system, a...
First IFIP International Cross-Domain Conference, IFIPIoT 2018, Held at the 24th IFIP World Computer Congress, WCC 2018, Poznan, Poland, September 18-19, 2018, Revised Selected Papers...
Ruby is an easy to learn programming language, it was invented by a guy named Matz in Japan. Ruby is a free software and can be used by any one for zero cost. Ruby's popularity was initially confined to Japan, later it slowly trickled out to rest of the world. Things changed with the emergence of Ruby on Rails which is a popular web-development fra...
The Ruby Notes for Professionals book is compiled from Stack Overflow Documentation, the content is written by the beautiful people at Stack Overflow....
It is an unofficial and free Ruby...
Ability to use information and communication technologies (ICT) is an imperative for effective participation in today's digital age. Schools worldwide are responding to the need to provide young people with that ability. But how effective are they in this regard? The IEA International Computer and Information Literacy Study (ICILS) responded to thi...