Méthode |
Description |
|
args ( ) : callable |
Returns a function that simply return that arguments
it receives. |
|
assoc ( array $arr, $k, $val ) : array |
Return a copy of the given array where the value
at index $k has been changed to $val. |
|
comp ( callable $f, callable $g ) : callable |
Compose the two functions |
|
concat ( ) : Generator |
Lazily iterate over all iterable collection given as parameters
in order. |
|
cycle ( callable $f ) : Generator |
Iterate infinitely on the result of the given callable. |
|
excludeNth ( integer $n, array $xs ) : array |
Return a copy of the array with the Nth element
removed. |
|
filter ( callable $f, $coll ) : Generator |
Filter the given iterable collection using the callback in a
lazy way. |
|
iterator ( $xs ) : ArrayIterator |
Return an iterator for the given collection if
possible. |
|
map ( callable $f, Iterator $coll ) : Generator |
Map a function to an iterable collection in a lazy way
using generators |
|
method ( ) : callable |
Return a function that calls the given method (first parameter)
on any given object with the given arguments (remaining parameters). |
|
partial ( ) : callable |
Return a callable with all the given arguments
already bound to the function (first parameter). |
|
partition ( integer $n, $coll ) : Generator |
Return the given collection partitioned in n sized segments
in a lazy fashion. |
|
property ( string $name ) : callable |
Return a function that returns the given property
on any given object. |
|
push ( array $xs, $x ) : array |
Return a copy of the given array with the given value
added at the end. |
|
range ( integer $min, integer $max ) : Generator |
Produce a range starting at $min and finishing with $max. |
|
realize ( array | Iterator $it ) : array |
Transform the given iterable collection to a "real" array. |
|
reduce ( callable $f, $xs, null $initial = null ) : mixed | null |
Reduce any iterable collection using the callback. In case
of an array, array_reduce is used. |
|
repeat ( integer $n, mixed $val ) : Generator |
repeat the value n times in a lazy fashion. |
|
rgen ( Generator $xs ) : RewindableIterator |
Return an Iterator allowing a rewind on the
given generator. |
|
str ( array $chars ) : string |
Create a string with the given char array. |
|
take ( integer $n, Iterator $it ) : Generator |
Return at most $n elements from the given iterable collection in
a lazy fashion. |
|
takeNth ( integer $n, $coll ) : Generator |
Return every Nth elements in the given collection in a lazy
fashion. |
|