kdaviesnz/list
Composer 安装命令:
composer require kdaviesnz/list
包简介
Enables functional style syntax eg $list->filter($cb)->map($cb2)
README 文档
README
Problem
You have an array and you need to remove anything that is not a number and double everything else.
Solution
$a = kdaviesnz/utilities/lists([null, "apple", 1,2,3]);
$result = $a->filter(function($item) { return is_numeric($item) } )->map(function($item) { return $item * 2 } )()
$a_parsed = $result()
See tests/listsTest.php
lists
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-06-04