letharion/functional-composable-php
Composer 安装命令:
composer require letharion/functional-composable-php
包简介
Wrapper around php's array functions making them composable.
README 文档
README
Composable functional programming in PHP
This library acts as a wrapper around several of PHP's built in array operators to provide an easy way to compose them.
Example:
<?php
require_once 'vendor/autoload.php';
use Letharion\Functional\Functional as F;
$a = [1, 2, 3, 4];
$f = new F($a);
$result = $f->walk(function(&$i) { return $i *= 2; })
->reduce(function($i, $j) { return $i + $j; })
->result();
var_dump($result);
int(20)
统计信息
- 总下载量: 57
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2014-12-15