Skip to content

Commit

Permalink
pipeline: add missing tap in Cheatsheet (Effect-TS#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
gcanti authored Jul 26, 2023
1 parent 79b20d7 commit 19c734f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pages/docs/essentials/pipeline.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ Let's summarize the transformation functions we have seen so far:
| ------------ | ----------------------------------------- | --------------------------- |
| `map` | `Effect<R, E, A>`, `A => B` | `Effect<R, E, B>` |
| `flatMap` | `Effect<R, E, A>`, `A => Effect<R, E, B>` | `Effect<R, E, B>` |
| `tap` | `Effect<R, E, A>`, `A => Effect<R, E, B>` | `Effect<R, E, A>` |
| `all` | `Effect<R, E, A>`, `Effect<R, E, B>`, ... | `Effect<R, E, [A, B, ...]>` |

These functions are powerful tools for transforming and chaining `Effect` computations. They allow you to apply functions to values inside `Effect` and build complex pipelines of computations.
Expand Down
2 changes: 1 addition & 1 deletion src/essentials/using-generators/pipeline-async-await.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const divide = (a: number, b: number): Promise<number> =>
: Promise.resolve(a / b)

// $ExpectType () => Promise<string>
export const program = async function () {
const program = async function () {
const [a, b] = await Promise.all([Promise.resolve(10), Promise.resolve(2)])
const n1 = await divide(a, b)
const n2 = increment(n1)
Expand Down

0 comments on commit 19c734f

Please sign in to comment.