phpfn/phpfn

Centralized monorepository for functional libraries

2.0.1 2020-11-22 21:17 UTC

This package is auto-updated.

Last update: 2024-04-06 04:37:35 UTC


README

Functional PHP

Travis CI 68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f34373031376565653062653462373534346231622f746573745f636f766572616765 68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f34373031376565653062653462373534346231622f6d61696e7461696e6162696c697479 68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f706870666e2f706870666e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572

PHP 7.4+ PHP 8.0 Compatible License MIT

Installation

Library can be installed into any PHP application:

$ composer require phpfn/phpfn

In order to access library make sure to include vendor/autoload.php in your file.

<?php

require __DIR__ . '/vendor/autoload.php';

Usage

This package includes

  • phpfn/curry is an implementation of currying and partial application.
  • phpfn/immutable is a little helper to ensure object immutability.
  • phpfn/pipe for the ability to use a sequence of functions as a chain.
  • phpfn/placeholder is a placeholder (looks like that: _) symbol implementation.
  • phpfn/symbol for the ability to create unique identifiers within the system.

See Also