aboutsummaryrefslogtreecommitdiff
path: root/docs/interfaces/effect.Do.md
blob: 1039bc7ea4f687026f6be431ff4b6a48167ae124 (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
[ts-types-lang](../README.md) / [Modules](../modules.md) / [effect](../modules/effect.md) / Do

# Interface: Do<_Effs\>

[effect](../modules/effect.md).Do

Evaluate a sequence of effects in series and get the result of the last effect (Equivalent to haskell's do syntax)

**`Example`**

```ts
type main = Bind<
  Do<[ Pure<1>, ReadFile<"./foobar.txt">  ]>,
  <t extends string>() => Print<t>
>
```

## Type parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `_Effs` | extends [`Effect`](effect.Effect.md)[] | List of effects |

## Hierarchy

- [`Effect`](effect.Effect.md)

  ↳ **`Do`**