Skip to content

Commit c6f5699

Browse files
committed
doc: improve EitherX section
1 parent 2763119 commit c6f5699

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,17 @@ Methods:
183183

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

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

188188
Constructors:
189189

190-
- `mo.NewEitherXArgY()` [doc](https://pkg.go.dev/github.com/samber/mo#NewEither5Arg1)
190+
- `mo.NewEitherXArgY()` [doc](https://pkg.go.dev/github.com/samber/mo#NewEither5Arg1). Eg:
191+
- `mo.NewEither3Arg1[A, B, C](A)`
192+
- `mo.NewEither3Arg2[A, B, C](B)`
193+
- `mo.NewEither3Arg3[A, B, C](C)`
194+
- `mo.NewEither4Arg1[A, B, C, D](A)`
195+
- `mo.NewEither4Arg2[A, B, C, D](B)`
196+
- ...
191197

192198
Methods:
193199

0 commit comments

Comments
 (0)