Because iterators do not have known length, liply starts by allocating an output list of length 50, and then doubles that length whenever it runs out of space. This gives O(n ln n) performance rather than the O(n ^ 2) performance from the naive strategy of growing the list each time.

liply(.iterator, .fun = NULL, ...)

Arguments

.iterator

iterator object

.fun

function to apply to each piece

...

other arguments passed on to .fun

Warning

Deprecated, do not use in new code.

See also