Introduction

Phamda is a functional programming library for PHP. The main features are:

  • A set mostly familiar functions, including basic ones like filter, map and reduce.
  • Almost all of the functions are automatically curried. Calling a function with fewer parameters than are expected returns a new function.
  • The functions are designed to be composable. Specific functions like compose and pipe enable different composition patterns.

Requirements

  • PHP 7.0+ or HHVM

Installation

Phamda can be installed easily in any project using Composer:

composer require phamda/phamda