Methods

mapΒΆ

map(arr:Arr, n:Int, mapper:Fun)

Map each N elements of an Array at a time. mapper is called as cb(eltI, ..., eltJ) where I is multiple of n and J is I+n-1 Throws InvalidArgument if number of items in arr is not divisible by n. mapper is called as mapper(eltI, ..., eltJ) where I is multiple of n and J is I+n-1
Source: stdlib.ngs:1118

arr

Items to iterate in chunks of n

n

Number of items in chunk

mapper

Function to be called with values from arr

Returns

Arr

Example

[1,2,3,4].map(2, F(a,b) "$a=$b").join("&")  # Outputs: 1=2&3=4