PHP Monad API Reference

Monad extends IteratorAggregate

Monad interface.

Tags
template
extends
immutable
Attributes
#[Sealed]
$permits: [\WizDevelop\PhpMonad\Result::class, \WizDevelop\PhpMonad\Option::class]

Table of Contents

Methods

andThen()  : Monad<string|int, U>
`>>=` in Haskell. (`Bind` operation.)
unit()  : Monad<string|int, TValue>
`return` in Haskell. (`Unit` operation.)

Methods

andThen()

`>>=` in Haskell. (`Bind` operation.)

public andThen(callable(T): Monad<string|int, U$right) : Monad<string|int, U>
Parameters
$right : callable(T): Monad<string|int, U>
Tags
template
Return values
Monad<string|int, U>

unit()

`return` in Haskell. (`Unit` operation.)

public static unit(TValue $value) : Monad<string|int, TValue>
Parameters
$value : TValue
Tags
template
Return values
Monad<string|int, TValue>

        
On this page

Search results