/** * @param callable $value * @return Failure|Success */ public static function of($value) { return Attempt($value); }
/** * @inheritdoc */ public function recover(callable $rescueException) { return Attempt(function () use($rescueException) { return call_user_func($rescueException, $this->err, $this); }); }