Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ap method to Effect, ap and zipWith to Either ⚡️ #1504

Merged
merged 7 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/breeze-maps-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": patch
---

feat: add `ap` method to `Effect`, `ap` and `zipWith` to `Either` ⚡️
17 changes: 17 additions & 0 deletions docs/modules/Effect.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ Added in v2.0.0
- [takeWhile](#takewhile)
- [validateAll](#validateall)
- [validateFirst](#validatefirst)
- [combining](#combining)
- [ap](#ap)
- [config](#config)
- [config](#config-1)
- [configProviderWith](#configproviderwith)
Expand Down Expand Up @@ -1132,6 +1134,21 @@ assert.deepStrictEqual(

Added in v2.0.0

# combining

## ap

**Signature**

```ts
export declare const ap: {
<R2, E2, A>(that: Effect<R2, E2, A>): <R, E, B>(self: Effect<R, E, (a: A) => B>) => Effect<R2 | R, E2 | E, B>
<R, E, A, B, R2, E2>(self: Effect<R, E, (a: A) => B>, that: Effect<R2, E2, A>): Effect<R | R2, E | E2, B>
}
```

Added in v2.0.0

# config

## config
Expand Down
28 changes: 28 additions & 0 deletions docs/modules/Either.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ Added in v2.0.0

- [combining](#combining)
- [all](#all)
- [ap](#ap)
- [flatMap](#flatmap)
- [zipWith](#zipwith)
- [constructors](#constructors)
- [fromNullable](#fromnullable)
- [fromOption](#fromoption)
Expand Down Expand Up @@ -102,6 +104,19 @@ assert.deepStrictEqual(Either.all({ a: Either.right(1), b: Either.left('error')

Added in v2.0.0

## ap

**Signature**

```ts
export declare const ap: {
<E2, A>(that: Either<E2, A>): <E, B>(self: Either<E, (a: A) => B>) => Either<E2 | E, B>
<E, A, B, E2>(self: Either<E, (a: A) => B>, that: Either<E2, A>): Either<E | E2, B>
}
```

Added in v2.0.0

## flatMap

**Signature**
Expand All @@ -115,6 +130,19 @@ export declare const flatMap: {

Added in v2.0.0

## zipWith

**Signature**

```ts
export declare const zipWith: {
<E2, A2, A, B>(that: Either<E2, A2>, f: (a: A, b: A2) => B): <E>(self: Either<E, A>) => Either<E2 | E, B>
<E, A, E2, A2, B>(self: Either<E, A>, that: Either<E2, A2>, f: (a: A, b: A2) => B): Either<E | E2, B>
}
```

Added in v2.0.0

# constructors

## fromNullable
Expand Down