PHPackages                             ikr/fyrfyrfyr - 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. ikr/fyrfyrfyr

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

ikr/fyrfyrfyr
=============

Basic tools for composing functions, to write simpler and safer programs

v0.1.0(10y ago)021.1kMITPHPPHP &gt;=5.4.0

Since May 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ikr/fyrfyrfyr)[ Packagist](https://packagist.org/packages/ikr/fyrfyrfyr)[ RSS](/packages/ikr-fyrfyrfyr/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

[![Build Status](https://camo.githubusercontent.com/ef8a544b7af8529deda2fb06c59fe5d83d0be3fa3b66225f3f1e63f84eedeca3/68747470733a2f2f7472617669732d63692e6f72672f696b722f6679726679726679722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ikr/fyrfyrfyr)

About
=====

[](#about)

Basic tools for composing functions, to write simpler and safer programs in PHP 5.4+. Heavily inspired by [@drboolean](https://twitter.com/drboolean)'s [book](https://drboolean.gitbooks.io/mostly-adequate-guide/content/), the [Ramda](http://ramdajs.com/) library, and the [Fantasy Land](https://github.com/fantasyland/fantasy-land) JS project.

[![fox logo](https://camo.githubusercontent.com/65dc2ecabec367e33b9c7ed43474d42b37c218485637d7120bed03eec5604d29/687474703a2f2f696b722e73752f682f696d672f6679726679726679722e706e67)](https://camo.githubusercontent.com/65dc2ecabec367e33b9c7ed43474d42b37c218485637d7120bed03eec5604d29/687474703a2f2f696b722e73752f682f696d672f6679726679726679722e706e67)

Why?
====

[](#why)

This library grew out of frustration with old PHP code I have to maintain. I'm convinced that functional programming can lead us [Out of the Tar Pit](http://shaffner.us/cs/papers/tarpit.pdf). I do know about [Phamda](https://github.com/mpajunen/phamda) and [Pramda](https://github.com/kapolos/pramda); very cool projects, but they both require PHP 5.6+. Then, I was also not 100% on board with some design choices those 2 make. I'd like to keep fyr-fyr-fyr tiny and lean, away from all sorts of cruft and magic. In many ways that's a matter of taste though.

API
===

[](#api)

Constructing functions
----------------------

[](#constructing-functions)

### Composition

[](#composition)

```
(f⋅g⋅h)(x)  f(g(h(x)))

```

### Currying

[](#currying)

```
f(x, y)  f(x)(y)

```

### Flipping the arguments

[](#flipping-the-arguments)

```
flip

```

Primary higher order functions
------------------------------

[](#primary-higher-order-functions)

```
map
chain
reduce
converge

```

Associative arrays
------------------

[](#associative-arrays)

```
assoc
assocPath
fromPairs
merge
mergeAll
pick
pickAll
prop
propOr

```

Lists
-----

[](#lists)

```
append
indexBy
minBy

```

Utilities
---------

[](#utilities)

```
add
always
identity
inc

```

Algebraic structures
--------------------

[](#algebraic-structures)

```
IO
Maybe

```

Status: WORK IN PROGRESS
========================

[](#status-work-in-progress)

Not yet ready for using in production

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3652d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/daaf17d2afc7680b0cf3f5e839ac4d0f55fdf1a21d1ad81224f08eb4180d8e8b?d=identicon)[ikr](/maintainers/ikr)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ikr-fyrfyrfyr/health.svg)

```
[![Health](https://phpackages.com/badges/ikr-fyrfyrfyr/health.svg)](https://phpackages.com/packages/ikr-fyrfyrfyr)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
