Sliding Windows in Clojure
I was doing a little Clojure programming and my son asked me if the computer could make it go 1 2 3, 2 3 4, 3 4 5, … I thought, hmm, that’s a sliding window. Here was my first thought: (->> (range 1 4) (map (fn [x] [x (inc x) (inc (inc x))])))...
Sep 18, 20252 min read47
