PHPackages                             nicmart/functionals - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nicmart/functionals

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nicmart/functionals
===================

Functionals is a collection of functionals for PHP

241203PHP

Since Aug 18Pushed 10y ago3 watchersCompare

[ Source](https://github.com/nicmart/Functionals)[ Packagist](https://packagist.org/packages/nicmart/functionals)[ RSS](/packages/nicmart-functionals/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Functionals [![Build Status](https://camo.githubusercontent.com/658016b75bd1b3ffa089d7ae42470daf34976dbbf4155798b07dd7a72dd8e45e/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6e69636d6172742f46756e6374696f6e616c732e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/nicmart/Functionals) [![Scrutinizer Quality Score](https://camo.githubusercontent.com/3ccb50b6fe4a7849b2907c11e1eeb4986e2964b3cc46b6fd7663e329a64cd3fa/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e69636d6172742f46756e6374696f6e616c732f6261646765732f7175616c6974792d73636f72652e706e673f733d30346662323737343132336237333330363132303934343132636361663562303666303362353965)](https://scrutinizer-ci.com/g/nicmart/Functionals/)
=================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#functionals--)

Functionals is a simple library that provides a set of functionals written in php.

What do you mean with "functionals"?
------------------------------------

[](#what-do-you-mean-with-functionals)

Here I use the term "functional" to denote [Higher-Order functions](http://en.wikipedia.org/wiki/Higher-order_function), i.e. functions that take other functions as input and return a function as output.

Install
-------

[](#install)

The best way to install Functionals is [through composer](http://getcomposer.org).

Just create a composer.json file for your project:

```
{
    "require": {
        "nicmart/functionals": "dev-master"
    }
}
```

Then you can run these two commands to install it:

```
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar install

```

or simply run `composer install` if you have have already [installed the composer globally](http://getcomposer.org/doc/00-intro.md#globally).

Then you can include the autoloader, and you will have access to the library classes:

```
