Array.pieces()

Revision as of 15:05, 4 March 2017 by Joseph (talk | contribs) (Created page with "==Array.pieces(PieceSize, GivenFunction) == Split the array into pieces of PieceSize (starting at each element!), and apply the GivenFunction to each piece. 1..5.pieces(3) ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Array.pieces(PieceSize, GivenFunction)

Split the array into pieces of PieceSize (starting at each element!), and apply the GivenFunction to each piece.

1..5.pieces(3)

1
2
3
2
3
4
3
4
5
4
5
5


1..5.pieces(3,SUM)

6
9
12
9
5