poohbar
02/11/2017, 1:16 AMpartition
in clojure in Kotlin. It basically splits up a list into groups of elements in sequence (not by predicate) and you can also specify an offset and step. For example in pseudo-code:
[1,2,3,4,5,6].partition(n=2, offset=1) == [[1,2],[2,3],[3,4],[4,5],[5,6]]