Sha256: 210309f142dfde2772a672739066f1e3c21c3dc459a657b0f00ff7a4736c8fd3
Contents?: true
Size: 367 Bytes
Versions: 2
Compression:
Stored size: 367 Bytes
Contents
## Array#each_overlap require 'facets/array/each_overlap' Iterate over each slice where the last n values of a preceding slice overlap with the first n values of the following slice. The value of n is specified by the second `overlap` argument. a, r = [1,2,3,4,5], [] a.each_overlap(2,1) { |x,y| r << [x,y] } r.assert == [[1,2],[2,3],[3,4],[4,5]]
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
facets-glimmer-3.2.0 | demo/core/array/each_overlap.md |
facets-3.1.0 | demo/core/array/each_overlap.md |