hexlet / pairs-data
Lists implementation
v2.0.1
2026-08-18 00:41 UTC
Requires
- php: >=8.5
- hexlet/pairs: ^2.0
Requires (Dev)
- phpunit/phpunit: ^13.3
- squizlabs/php_codesniffer: ^4.0
This package is auto-updated.
Last update: 2026-08-18 00:41:15 UTC
README
Functions for working with Lists.
Examples
<?php use function Php\Pairs\Data\Lists\l; use function Php\Pairs\Data\Lists\length; use function Php\Pairs\Data\Lists\filter; use function Php\Pairs\Data\Lists\toString; $list = l(1, 2, 3, 4, 5, 6); $length = length($list); // $length = 6; $filter = filter($list, fn($x) => $x % 2 == 0); $result = toString($filter); // $result = "(2, 4, 6)";
This repository is created and maintained by the team and the community of Hexlet, an educational project. Read more about Hexlet.
See most active contributors on hexlet-friends.
