windmillium/Code-Katas — comment on commit 52bda8bcf8ab9af810b1a7a00d78fdf3d93c014e
File:  line 0
By windmillium:

Conditionals are a code smell, in this case it is somewhat of a wash between complexities but because of the branching nature of conditionals they quickly lead to much higher complexity so it's best to avoid them when you can. On the other hand, method chaining complexity is linear. Once you begin you learn more about the standard library and how to compose methods you will find that you can do pretty much anything you want to a collection just via methods.