WorkflowResultModule

PackageFCQRS.Workflows
Functions on a workflow that gives a `Result`.

Summary

NameSignatureSynopsis
bindWorkflowResult.bind next sourceContinues with `next` after an `Ok`, and gives an `Error` unchanged.
mapWorkflowResult.map f sourceApplies `f` to an `Ok` value.
mapErrorWorkflowResult.mapError f sourceApplies `f` to an `Error`, so steps with different error types can share one block.
ofWorkflowWorkflowResult.ofWorkflow sourceGives `Ok` with the value of a step that does not give a `Result`.

bind

WorkflowResult.bind next source
Member
Continues with `next` after an `Ok`, and gives an `Error` unchanged.

Parameters

NameTypeDescription
next'A -> Workflow<Result<'B, 'E>>
sourceWorkflow<Result<'A, 'E>>

Returns

Workflow<Result<'B, 'E>>

map

WorkflowResult.map f source
Member
Applies `f` to an `Ok` value.

Parameters

NameTypeDescription
f'A -> 'B
sourceWorkflow<Result<'A, 'E>>

Returns

Workflow<Result<'B, 'E>>

mapError

WorkflowResult.mapError f source
Member
Applies `f` to an `Error`, so steps with different error types can share one block.

Parameters

NameTypeDescription
f'E -> 'F
sourceWorkflow<Result<'T, 'E>>

Returns

Workflow<Result<'T, 'F>>

ofWorkflow

WorkflowResult.ofWorkflow source
Member
Gives `Ok` with the value of a step that does not give a `Result`.

Parameters

NameTypeDescription
sourceWorkflow<'T>

Returns

Workflow<Result<'T, 'E>>