Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 1.46 KB

README.md

File metadata and controls

41 lines (33 loc) · 1.46 KB

Phantasy CircleCICoverage Status

Functional Programming Helpers and Data Types for PHP.

Getting Started

Installation

composer require mckayb/phantasy

Usage

use Phantasy\DataTypes\Maybe\Maybe;
use function Phantasy\Core\prop;

$user = [ "name" => "Foo", "email" => "foo@example.com" ];
$name = Maybe::of($user)
	->map(prop('name'))
	->getOrElse(null);
// "Foo"

For more information, read the docs!

What's Included

  • Currying, Composition, Higher-Order Functions, etc
  • Maybe, Either, Reader, Writer, State, Linked List, Validation Data Types.
  • More coming...

Contributing

Find a bug? Want to make any additions? Just create an issue or open up a pull request.

Want more?

For other helpers not included in this repo, check out

Inspiration