blob: bc42d06b4f8fb2325f5cf60e9366cb34e5fb6396 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
[ts-types-lang](../README.md) / [Modules](../modules.md) / [effect](../modules/effect.md) / Bind
# Interface: Bind<_Eff, _Fn\>
[effect](../modules/effect.md).Bind
Monadic bind an effect to a function (Equivalent to haskell's >>= operator)
**`Example`**
```ts
type main = Bind<
ReadFile<"./file.txt">,
<contents extends string>() => Print<contents>
>
```
## Type parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `_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
- [`Effect`](effect.Effect.md)
↳ **`Bind`**
|