Consider the following code:
use Chemem\Bingo\Functional\Functors\Monads\IO;
$io = IO::of(function () {
echo 'LOG 1', PHP_EOL;
})
->bind(function () {
return IO::of(function () {
echo 'LOG 2', PHP_EOL;
});
});
It prints LOG 1 even $io->exec() is not called.
Consider the following code:
It prints
LOG 1even$io->exec()is not called.