Download the PHP package nemorize/curried without Composer
On this page you can find all versions of the php package nemorize/curried. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download nemorize/curried
More information about nemorize/curried
Files in nemorize/curried
Download nemorize/curried
More information about nemorize/curried
Files in nemorize/curried
Vendor nemorize
Package curried
Short Description A utility to create curried functions that its parameters are reordered by user-defined order.
License MIT
Package curried
Short Description A utility to create curried functions that its parameters are reordered by user-defined order.
License MIT
Please rate this library. Is it a good library?
Informations about the package curried
php-create-curried
A utility to create curried functions that its parameters are reordered by user-defined order.
Inspired by https://github.com/andjsrk/create-curried.
Requirements
- PHP 8.1 or later
Installation
Usage
Curried
Curried::from(Closure $fn): Context
Returns a Context
for a given closure.
Context
Context::takes(int $position): Context
Takes a parameter at the given position.
Context::takesRest(): Context
Takes the rest of parameters.
Context::withStatic(int $position): Closure
Binds a parameter at the given position to the closure.
Returned closure returns a Context
for the next parameter.
Context::generate(): Closure
Generates a curried function.
Examples
Plus one to each element of an array
Sum of an array
All versions of curried with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.1
The package nemorize/curried contains the following files
Loading the files please wait ....