PHPackages                             yuyat/compose - 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. yuyat/compose

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

yuyat/compose
=============

Function to compose functions

07PHP

Since Oct 1Pushed 11y ago1 watchersCompare

[ Source](https://github.com/yuya-takeyama/compose)[ Packagist](https://packagist.org/packages/yuyat/compose)[ RSS](/packages/yuyat-compose/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

yuyat\\compose
==============

[](#yuyatcompose)

Function to compose functions.

Function-composition is commonly used technique in functional programming.
You can combine any `callable`'s to build another function.

This library only supports PHP 5.6 later.
If you use the other version, [igorw/compose](https://github.com/igorw/compose) is useful.

Usage
-----

[](#usage)

### yuyat\\compose

[](#yuyatcompose-1)

Calling `compose($f, $g, $h)` with an argument `$x` is equal to `$f($g($h($x)))`

```
