<?php
declare(strict_types=1);
use Fp4\PHP\Option as O;
use function Fp4\PHP\Combinator\pipe;
/** @var string|int */
$stringOrNumber = 'str';
// current type is: Option<Bindable<object{a:int|string}>>
// should be is: Option<Bindable<object{a:string}>>
$_ = pipe(
O\bindable(),
O\let(a: fn() => $stringOrNumber),
O\filter(fn($i) => is_string($i->a)),
);Reactions are currently unavailable