functions.php
This code is forked from https://github.com/matteosister/php-curry, which is abandoned. It could be integrated into the rest of Parsica.
Table of Contents
Functions
- curry() : callable
- curry_right() : callable
- _curry_array_args() : callable
- __() : Placeholder
- Gets a special placeholder value used to specify "gaps" within curried functions, allowing partial application of any combination of arguments, regardless of their positions. Should be used only for required arguments.
Functions
curry()
curry(callable $callable) : callable
Parameters
- $callable : callable
Tags
Return values
callablecurry_right()
curry_right(callable $callable) : callable
Parameters
- $callable : callable
Tags
Return values
callable_curry_array_args()
_curry_array_args(callable $callable, array<string|int, mixed> $args[, bool $left = true ]) : callable
Parameters
- $callable : callable
- $args : array<string|int, mixed>
- $left : bool = true
Tags
Return values
callable__()
Gets a special placeholder value used to specify "gaps" within curried functions, allowing partial application of any combination of arguments, regardless of their positions. Should be used only for required arguments.
__() : Placeholder
When used, optional arguments must be at the end of the argument list.