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