Widmogrod\Monad\Maybe\Nothing::of PHP Method

of() public static method

public static of ( $value )
    public static function of($value)
    {
        return new static();
    }

Usage Example

Example #1
0
 public function provideFunctorTestData()
 {
     return ['Just' => ['$f' => function ($x) {
         return $x + 1;
     }, '$g' => function ($x) {
         return $x + 5;
     }, '$x' => Just::of(1)], 'Nothing' => ['$f' => function ($x) {
         return $x + 1;
     }, '$g' => function ($x) {
         return $x + 5;
     }, '$x' => Nothing::of(1)]];
 }
All Usage Examples Of Widmogrod\Monad\Maybe\Nothing::of