Klaus and Erik introduced us to some of the most important concepts in computer science.
After today, when it comes to iterators, we are now gobsmackingly confident with the usage of:
These methods take collections and return different thingies (see Klaus's drawing). It's fantastic because you can compress your code a lot - just like us. Removing 11 lines and it still works... pretty nice refactoring, huh? :)
Quote of the day:
Klaus: “What does the method .select do ?"
Brigitte: “Circles, circles… and then less circles at the end."
After today, when it comes to iterators, we are now gobsmackingly confident with the usage of:
- .each
- .map / .collect
- .inject / .reduce
- .select
- .reject
These methods take collections and return different thingies (see Klaus's drawing). It's fantastic because you can compress your code a lot - just like us. Removing 11 lines and it still works... pretty nice refactoring, huh? :)
Quote of the day:
Klaus: “What does the method .select do ?"
Brigitte: “Circles, circles… and then less circles at the end."