hexlet / pairs
Pairs implementation
v2.0.0
2026-08-18 00:35 UTC
Requires
- php: >=8.5
Requires (Dev)
- phpunit/phpunit: ^13.3
- squizlabs/php_codesniffer: ^4.0
This package is auto-updated.
Last update: 2026-08-18 00:35:31 UTC
README
Functions for working with Pairs.
Examples
<?php use function Php\Pairs\Pairs\cons; use function Php\Pairs\Pairs\car; use function Php\Pairs\Pairs\cdr; use function Php\Pairs\Pairs\toString; $pair = cons(1, 2); $one = car($pair); // $one = 1; $two = cdr($pair); // $two = 2; $str = toString($pair); // '(1, 2)'
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.
