Kjært barn har mange navn - or, the story of how I discovered Ruby's each_cons
Reading the Pragmatic Programmer's PragPub from March (I must admit I don't have/take the time to read them regularly enough) I stumbled upon Scala's sliding function on Arrays. This creates a sliding window of consecutive sub arrays of an array. So an Array(1,2,3,4).sliding(2)...
[Read More]