curry.php
Table of Contents
Functions
- curry() : callable
- Returns currying function. Uses reflection to automatically detect number of parameters given callback is accepting.
- curryN() : callable
- Returns currying function expecting n parameters.
- curry3() : callable
- Returns currying function awaiting 3 arguments.
- curry2() : callable
- Returns currying function awaiting 2 arguments.
- curry1() : callable
- Returns currying function awaiting 1 argument.
- __() : Placeholder
- Returns placeholder for omitting some arguments in currying functions.
Functions
curry()
Returns currying function. Uses reflection to automatically detect number of parameters given callback is accepting.
curry(callable $callback) : callable
Parameters
- $callback : callable
-
callable to be curried
Tags
Return values
callable —curryN()
Returns currying function expecting n parameters.
curryN(int $argumentsCount, callable $callback) : callable
Parameters
- $argumentsCount : int
- $callback : callable
Return values
callable —curry3()
Returns currying function awaiting 3 arguments.
curry3(callable $callback) : callable
Parameters
- $callback : callable
-
Callable accepting exactly 3 parameters.
Return values
callable —curry2()
Returns currying function awaiting 2 arguments.
curry2(callable $callback) : callable
Parameters
- $callback : callable
-
Callable accepting exactly 2 parameters.
Return values
callable —curry1()
Returns currying function awaiting 1 argument.
curry1(callable $callback) : callable
Parameters
- $callback : callable
-
Callable accepting exactly 1 parameter.
Return values
callable —__()
Returns placeholder for omitting some arguments in currying functions.
__() : Placeholder