Skip to content

Commit

Permalink
feat: as and asUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
sukovanej committed May 19, 2023
1 parent be3acab commit c717ab8
Show file tree
Hide file tree
Showing 40 changed files with 787 additions and 13 deletions.
29 changes: 29 additions & 0 deletions docs/modules/Either.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ Added in v2.0.0
- [liftNullable](#liftnullable)
- [liftOption](#liftoption)
- [mapping](#mapping)
- [as](#as)
- [asUnit](#asunit)
- [bimap](#bimap)
- [flap](#flap)
- [map](#map)
Expand Down Expand Up @@ -1306,6 +1308,33 @@ Added in v2.15.0
# mapping
## as
Maps the `Right` value of this `Either` to the specified constant value.
**Signature**
```ts
export declare const as: {
<E, A, _>(self: Either<E, _>, a: A): Either<E, A>
<A>(a: A): <E, _>(self: Either<E, _>) => Either<E, A>
}
```
Added in v2.16.0
## asUnit
Maps the `Right` value of this `Either` to the void constant value.
**Signature**
```ts
export declare const asUnit: <E, _>(self: Either<E, _>) => Either<E, void>
```
Added in v2.16.0
## bimap
Map a pair of functions over the two type arguments of the bifunctor.
Expand Down
26 changes: 26 additions & 0 deletions docs/modules/IO.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Added in v2.0.0
- [chain](#chain)
- [chainFirst](#chainfirst)
- [mapping](#mapping)
- [as](#as)
- [asUnit](#asunit)
- [flap](#flap)
- [map](#map)
- [model](#model)
Expand Down Expand Up @@ -288,6 +290,30 @@ Added in v2.0.0
# mapping
## as
Maps the value to the specified constant value.
**Signature**
```ts
export declare const as: { <A, _>(self: IO<_>, a: A): IO<A>; <A>(a: A): <_>(self: IO<_>) => IO<A> }
```
Added in v2.16.0
## asUnit
Maps the value to the void constant value.
**Signature**
```ts
export declare const asUnit: <_>(self: IO<_>) => IO<void>
```
Added in v2.16.0
## flap
**Signature**
Expand Down
29 changes: 29 additions & 0 deletions docs/modules/IOEither.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ Added in v2.0.0
- [liftNullable](#liftnullable)
- [liftOption](#liftoption)
- [mapping](#mapping)
- [as](#as)
- [asUnit](#asunit)
- [bimap](#bimap)
- [flap](#flap)
- [map](#map)
Expand Down Expand Up @@ -1069,6 +1071,33 @@ Added in v2.15.0

# mapping

## as

Maps the `Right` value of this `IOEither` to the specified constant value.

**Signature**

```ts
export declare const as: {
<E, A, _>(self: IOEither<E, _>, a: A): IOEither<E, A>
<A>(a: A): <E, _>(self: IOEither<E, _>) => IOEither<E, A>
}
```

Added in v2.16.0

## asUnit

Maps the `Right` value of this `IOEither` to the void constant value.

**Signature**

```ts
export declare const asUnit: <E, _>(self: IOEither<E, _>) => IOEither<E, void>
```

Added in v2.16.0

## bimap

Map a pair of functions over the two type arguments of the bifunctor.
Expand Down
29 changes: 29 additions & 0 deletions docs/modules/IOOption.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ Added in v2.12.0
- [fromOptionK](#fromoptionk)
- [fromPredicate](#frompredicate)
- [mapping](#mapping)
- [as](#as)
- [asUnit](#asunit)
- [flap](#flap)
- [map](#map)
- [model](#model)
Expand Down Expand Up @@ -760,6 +762,33 @@ Added in v2.12.0
# mapping
## as
Maps the `Some` value of this `IOOption` to the specified constant value.
**Signature**
```ts
export declare const as: {
<A, _>(self: IOOption<_>, a: A): IOOption<A>
<A>(a: A): <_>(self: IOOption<_>) => IOOption<A>
}
```
Added in v2.16.0
## asUnit
Maps the `Some` value of this `IOOption` to the void constant value.
**Signature**
```ts
export declare const asUnit: <_>(self: IOOption<_>) => IOOption<void>
```
Added in v2.16.0
## flap
**Signature**
Expand Down
26 changes: 26 additions & 0 deletions docs/modules/Option.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ Added in v2.0.0
- [fromNullableK](#fromnullablek)
- [fromPredicate](#frompredicate)
- [mapping](#mapping)
- [as](#as)
- [asUnit](#asunit)
- [flap](#flap)
- [map](#map)
- [model](#model)
Expand Down Expand Up @@ -1151,6 +1153,30 @@ Added in v2.0.0

# mapping

## as

Maps the `Some` value of this `Option` to the specified constant value.

**Signature**

```ts
export declare const as: { <A, _>(self: Option<_>, a: A): Option<A>; <A>(a: A): <_>(self: Option<_>) => Option<A> }
```

Added in v2.16.0

## asUnit

Maps the `Some` value of this `Option` to the void constant value.

**Signature**

```ts
export declare const asUnit: <_>(self: Option<_>) => Option<void>
```

Added in v2.16.0

## flap

**Signature**
Expand Down
29 changes: 29 additions & 0 deletions docs/modules/ReaderEither.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ Added in v2.0.0
- [liftNullable](#liftnullable)
- [liftOption](#liftoption)
- [mapping](#mapping)
- [as](#as)
- [asUnit](#asunit)
- [bimap](#bimap)
- [flap](#flap)
- [map](#map)
Expand Down Expand Up @@ -1040,6 +1042,33 @@ Added in v2.15.0

# mapping

## as

Maps the `Right` value of this `ReaderEither` to the specified constant value.

**Signature**

```ts
export declare const as: {
<R, E, A, _>(self: ReaderEither<R, E, _>, a: A): ReaderEither<R, E, A>
<A>(a: A): <R, E, _>(self: ReaderEither<R, E, _>) => ReaderEither<R, E, A>
}
```

Added in v2.16.0

## asUnit

Maps the `Right` value of this `ReaderEither` to the void constant value.

**Signature**

```ts
export declare const asUnit: <R, E, _>(self: ReaderEither<R, E, _>) => ReaderEither<R, E, void>
```

Added in v2.16.0

## bimap

Map a pair of functions over the two last type arguments of the bifunctor.
Expand Down
29 changes: 29 additions & 0 deletions docs/modules/ReaderIO.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ Added in v2.13.0
- [fromIOK](#fromiok)
- [fromReaderK](#fromreaderk)
- [mapping](#mapping)
- [as](#as)
- [asUnit](#asunit)
- [flap](#flap)
- [map](#map)
- [model](#model)
Expand Down Expand Up @@ -487,6 +489,33 @@ Added in v2.13.0
# mapping
## as
Maps the value to the specified constant value.
**Signature**
```ts
export declare const as: {
<R, A, _>(self: ReaderIO<R, _>, a: A): ReaderIO<R, A>
<A>(a: A): <R, _>(self: ReaderIO<R, _>) => ReaderIO<R, A>
}
```
Added in v2.16.0
## asUnit
Maps the value to the void constant value.
**Signature**
```ts
export declare const asUnit: <R, _>(self: ReaderIO<R, _>) => ReaderIO<R, void>
```
Added in v2.16.0
## flap
**Signature**
Expand Down
29 changes: 29 additions & 0 deletions docs/modules/ReaderTask.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ Added in v2.3.0
- [fromReaderK](#fromreaderk)
- [fromTaskK](#fromtaskk)
- [mapping](#mapping)
- [as](#as)
- [asUnit](#asunit)
- [flap](#flap)
- [map](#map)
- [model](#model)
Expand Down Expand Up @@ -620,6 +622,33 @@ Added in v2.4.0
# mapping
## as
Maps the value to the specified constant value.
**Signature**
```ts
export declare const as: {
<R, A, _>(self: ReaderTask<R, _>, a: A): ReaderTask<R, A>
<A>(a: A): <R, _>(self: ReaderTask<R, _>) => ReaderTask<R, A>
}
```
Added in v2.16.0
## asUnit
Maps the value to the void constant value.
**Signature**
```ts
export declare const asUnit: <R, _>(self: ReaderTask<R, _>) => ReaderTask<R, void>
```
Added in v2.16.0
## flap
**Signature**
Expand Down
29 changes: 29 additions & 0 deletions docs/modules/ReaderTaskEither.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ Added in v2.0.0
- [liftNullable](#liftnullable)
- [liftOption](#liftoption)
- [mapping](#mapping)
- [as](#as)
- [asUnit](#asunit)
- [bimap](#bimap)
- [flap](#flap)
- [map](#map)
Expand Down Expand Up @@ -1503,6 +1505,33 @@ Added in v2.15.0

# mapping

## as

Maps the `Right` value of this `ReaderTaskEither` to the specified constant value.

**Signature**

```ts
export declare const as: {
<R, E, A, _>(self: ReaderTaskEither<R, E, _>, a: A): ReaderTaskEither<R, E, A>
<A>(a: A): <R, E, _>(self: ReaderTaskEither<R, E, _>) => ReaderTaskEither<R, E, A>
}
```

Added in v2.16.0

## asUnit

Maps the `Right` value of this `ReaderTaskEither` to the void constant value.

**Signature**

```ts
export declare const asUnit: <R, E, _>(self: ReaderTaskEither<R, E, _>) => ReaderTaskEither<R, E, void>
```

Added in v2.16.0

## bimap

Map a pair of functions over the two last type arguments of the bifunctor.
Expand Down
Loading

0 comments on commit c717ab8

Please sign in to comment.