use Fp4PHP\ArrayList;
use function Fp4PHP\Combinator\pipe;
use const Fp4PHP\Combinator\accessor as it;
$persons = [
new Person(id: 1, name: 'person#1'),
new Person(id: 2, name: 'person#2'),
new Person(id: 3, name: 'person#3'),
];
// Shorthand version
$names = pipe(
$persons,
ArrayList\map(it->getName()),
);
// Classic version
$names = pipe(
$persons,
ArrayList\map(static fn (Person $p) => $p->getName()),
);
Property fetch
ArrayDimFetch
MethodCall