mckayb/phantasy
Composer 安装命令:
composer require mckayb/phantasy
包简介
A basic functional programming library for PHP
README 文档
README
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
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-03-30