Hugo Sales e8e8000b16 Update composer dependencies | 4 年 前 | |
---|---|---|
.. | ||
docs | 4 年 前 | |
src | 4 年 前 | |
tests | 4 年 前 | |
.editorconfig | 4 年 前 | |
.gitignore | 4 年 前 | |
.php_cs.dist | 4 年 前 | |
.phpstorm.meta.php | 4 年 前 | |
.scrutinizer.yml | 4 年 前 | |
.travis.yml | 4 年 前 | |
LICENSE | 4 年 前 | |
README.md | 4 年 前 | |
composer.json | 4 年 前 | |
phpcs.xml.dist | 4 年 前 | |
phpunit.xml.dist | 4 年 前 |
NOTE: functional-php used to come with a C extension that implemented most of the functions natively. As the performance differences weren’t that huge compared to the maintenance cost it has been removed.
A set of functional primitives for PHP, heavily inspired by Scala’s traversable collection, Dojo’s array functions and Underscore.js
Traversable
$value
, $index
, $collection
. Strict comparison is the default but can be changedFunctional
to not raise conflicts with any other extension or libraryRun the following command in your project root:
composer require lstrojny/functional-php
git clone
the projectcomposer install
composer run tests
Functional\flatten()
Functional\unique()
, Functional\invoke_first()
,
Functional\invoke_last()
and all the discussions