Skip to content

Commit

Permalink
doc: improve EitherX section
Browse files Browse the repository at this point in the history
  • Loading branch information
samber committed Sep 4, 2022
1 parent 2763119 commit c6f5699
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,17 @@ Methods:

### EitherX[T1, ..., TX] (With X between 3 and 5)

`EitherX` respresents a value of x possible types. An instance of `EitherX` is an instance of either `T1` to `TX`.
`EitherX` respresents a value of X possible types. For example, an `Either3` value is either `T1`, `T2` or `T3`.

Constructors:

- `mo.NewEitherXArgY()` [doc](https://pkg.go.dev/github.com/samber/mo#NewEither5Arg1)
- `mo.NewEitherXArgY()` [doc](https://pkg.go.dev/github.com/samber/mo#NewEither5Arg1). Eg:
- `mo.NewEither3Arg1[A, B, C](A)`
- `mo.NewEither3Arg2[A, B, C](B)`
- `mo.NewEither3Arg3[A, B, C](C)`
- `mo.NewEither4Arg1[A, B, C, D](A)`
- `mo.NewEither4Arg2[A, B, C, D](B)`
- ...

Methods:

Expand Down

0 comments on commit c6f5699

Please sign in to comment.