Là một dự án mã nguồn mở, nikic/iter đã đạt 1.1k sao trên GitHub, ngôn ngữ PHP. Iteration primitives using generators
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
This library implements iteration primitives like map() and filter()
using generators. To a large part this serves as a repository for small
examples of generator usage, but of course the functions are also practically
quite useful.
All functions in this library accept arbitrary iterables, i.e. arrays,
traversables, iterators and aggregates, which makes it quite different from
functions like array_map() (which only accept arrays) and the SPL iterators
(which usually only accept iterators, not even aggregates). The operations are
of course lazy.
Install
To install with composer:
composer require nikic/iter
Functionality
A small usage example for the map() and range() functions:
As the functionality is implemented using generators the resulting iterators
are by default not rewindable. This library implements additional functionality
to allow creating rewindable generators.
You can find documentation for this in iter.rewindable.php,
here is just a small usage example of the two main functions:
<?php
use iter\func;
require 'path/to/vendor/autoload.php';
/* Create a rewindable map function which can be used multiple times */
$rewindableMap = iter\makeRewindable('iter\\map');
$res = $rewindableMap(func\operator('*', 3), [1, 2, 3]);
/* Do a rewindable call to map, just once */
$res = iter\callRewindable('iter\\map', func\operator('*', 3), [1, 2, 3]);
The above functions are only useful for your own iterators though; for the
iter iterators, rewindable variants are directly provided with an
iter\rewindable prefix:
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/nikic/iter là nguồn chính thức.
nikic/iter có bao nhiêu sao?
nikic/iter có 1.1k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/nikic/iter. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
nikic/iter có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho nikic/iter. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
nikic/iter có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho nikic/iter. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
nikic/iter có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho nikic/iter. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
nikic/iter còn đang phát triển không?
Commit gần nhất trên nikic/iter là 1 tháng trước (theo timestamp GitHub). Repo có 70 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc iter có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về iter.