xenira/iter-tools
最新稳定版本:v0.1.0
Composer 安装命令:
composer require xenira/iter-tools
包简介
Library to make iterator pattern less cumbersome in php
README 文档
README
Table of ContentsSimple PHP library for making working with iterators more fun.
Heavily inspired by rust’s iterators.
Currently not all methods are implemented, but the most important ones are. Use with caution.
1. Usage
$iterator = new ArrayIterator([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); $iterator = $iterator ->filter(fn ($value) => $value % 2 === 0) ->map(fn ($value) => $value * 2) ->take(4); assert($iterator->collect() === [4, 8, 12, 16]);
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MPL-2.0
- 更新时间: 2023-09-07