Documentation

Curry

Table of Contents

Classes

Placeholder
This class is created simply to define a special type for the placeholder. As defining a constant, even a random one, could collide with other values.

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
psalm-param

pure-callable $callable

psalm-return

pure-callable

throws
Exception
psalm-pure
Return values
callable

curry_right()

curry_right(callable $callable) : callable
Parameters
$callable : callable
Tags
psalm-param

pure-callable $callable

psalm-return

pure-callable

psalm-pure
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
psalm-param

pure-callable $callable

psalm-param

array $args

psalm-param

bool $left

psalm-return

pure-callable

psalm-pure
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.

Tags
psalm-pure
Return values
Placeholder

        
On this page

Search results