3lvir4/funfp

Some functional programming utilities.

v0.0.3 2024-04-03 14:31 UTC

This package is auto-updated.

Last update: 2024-12-03 16:39:11 UTC


README

Latest Stable Version CI Status

FunFP - Functional Programming Utilities for PHP

FunFP is a package designed to provide some functional programming paradigms and utils within your PHP projects.

Key features include a lot of iterator lazy operations like map, filter, groupBy among others for fluid manipulation of iterable data, along with some helpers.

Additionally, there is option and result types for handling errors by value and nullable values in a more fluid manner when PHP doesn't provide a convenient way to do it already. There is also basic iterators for various string manipulations like iterating over bytes, characters, lines, words etc...

Installation

You can add this library as a local, per-project dependency to your project using Composer:

composer require 3lvir4/funfp

If you only need this library during development, then you should add it as a development-time dependency:

composer require --dev 3lvir4/funfp

Wiki

maybe

Footnote

The goal of this library is not to turn PHP into haskell or whatever. I tried to aim at specific functional tools according to some stuff I wish I needed in some of my PHP projects.