Returns an array of arrays of length size with consecutive elements from the original array. Returns an empty array if size is shorter than the array or is not an integer.
size
import * as A from "flurp/array";const makeTriples = A.aperture(3);makeTriples([2, 4, 6, 8, 10, 12, 14]);// [// [2, 4, 6],// [4, 6, 8],// [6, 8, 10],// [8, 10, 12],// [10, 12, 14],// ]
Returns an array of arrays of length
sizewith consecutive elements from the original array. Returns an empty array ifsizeis shorter than the array or is not an integer.Example