Blocks, procs and lambdas Flashcards
1
Q
how to jump from a method to a block then back again to the method?
A
yeild
ps yeild can take parameters just like the method
2
Q
what is the different between a block and proc?
A
blocks are not objects and they cant be saved to variables, so we use procs to DRY our code.