list_compose (integer count, function composer) ⇒ list
Produces a list containing a specified number of values created from the composer function.
First available: Version 1.10.1
Examples
This function can speed up development of complex lists, including the sequence of doubling numbers:
YASS
$l = list_compose(100, function($i, $previous) { if ($previous == null) return 1 else return $previous * 2 end if })
Comments