Skip to content
<Thenable Effect> then <handler: result => Effect>

The then macro can be used in conjunction with effects that perform external calls, such as message, call and HTTP requests. The macro will bind a handler that will receive the response for further evaluation. The handler may return an additional effect allowing chaining of external calls within the same Reactor method.

Examples

from {
myMethod = (args) =>
call (
'myOtherReactor'
'myOtherMethod'
{ }
) then result =>
return result match
number |> result + 1
|> 'Unexpected response from ''myOtherReactor'''
}
Back to Index