I've long been a fan of the programming pattern that I call
the collection
pipeline. This allows me to write computation on collections
in the form of a pipeline of familiar operations (eg filter,
map, reduce). More and more language environments now have the
language features and collection APIs to support pipelines, but
since they have been limited in use for so long, more people are
familiar with loops. In this article (which I'm releasing in
installments) I'll take some loops and show how I'd refactor
them into collection pipelines.
Published on June 24, 2015 04:28