Functional utilities
This library contains functional utilities intended for use with PHP 8.1 and later. Its primary tool is the pipe()
function, which takes a starting argument and then a series of callables to "pipe" that argument through. Most other functions are utilities that produce a closure that takes the return from a previous pipe()
step as its only argument.
That provides a reasonably good experience for building multi-step functional pipelines and composition, at least until PHP itself gets a proper pipe operator. :-)
Install
Via Composer
$ composer require crell/fp
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email larry at garfieldtech dot com instead of using the issue tracker.
Credits
License
The Lesser GPL version 3 or later. Please see License File for more information.