19 abstract public function transform($from);
28 $value = $this->transform(
$result->value());
29 }
catch (\Exception $exception) {
30 return new Result\Error($exception);
33 return new Result\Ok($value);
An exception for terminatinating execution or to throw for unit testing.
A result encapsulates a value or an error and simplifies the handling of those.
trait DeriveApplyToFromTransform