diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-01-15 00:13:04 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-01-15 00:13:04 +0530 |
| commit | d5c3af89ab8076bcf4107859c1ba6b47a7815142 (patch) | |
| tree | 1da469a7007fe2cfced0647ae62c1cd003a3fa0d /docs/interfaces/effect.Bind.md | |
| parent | e75a5a15912b8f297fe9c9747f574486d6c4e334 (diff) | |
| download | ts-types-lang-d5c3af89ab8076bcf4107859c1ba6b47a7815142.tar.gz ts-types-lang-d5c3af89ab8076bcf4107859c1ba6b47a7815142.zip | |
chore: some more documentation
Diffstat (limited to 'docs/interfaces/effect.Bind.md')
| -rw-r--r-- | docs/interfaces/effect.Bind.md | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/docs/interfaces/effect.Bind.md b/docs/interfaces/effect.Bind.md index 334bd5f..bc42d06 100644 --- a/docs/interfaces/effect.Bind.md +++ b/docs/interfaces/effect.Bind.md @@ -4,20 +4,23 @@ [effect](../modules/effect.md).Bind -Generic interface for declaring effects +Monadic bind an effect to a function (Equivalent to haskell's >>= operator) **`Example`** ```ts -interface MyEffect extends Effect<string[]> {} +type main = Bind< + ReadFile<"./file.txt">, + <contents extends string>() => Print<contents> +> ``` ## Type parameters | Name | Type | Description | | :------ | :------ | :------ | -| `_Eff` | extends [`Effect`](effect.Effect.md) | The output generated by the effect (defaults to `unknown`) | -| `_Fn` | extends [`Func`](../modules/effect.md#func) | - | +| `_Eff` | extends [`Effect`](effect.Effect.md) | Effect to evaluate first | +| `_Fn` | extends [`Func`](../modules/effect.md#func) | Function to call with the result of _Eff | ## Hierarchy |
