-
Notifications
You must be signed in to change notification settings - Fork 102
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
Add Either
docs
#324
Add Either
docs
#324
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some comments, but really great PR 👍
docs/src/pages/docs/crocks/Async.md
Outdated
or a function that returns an instance of `Either`. When passed the instance, | ||
a transformed `Async` is returned. When passed an `Either` returning function, | ||
a function will be returned that takes a given value and returns an `Async`. | ||
signatures and will behave differently when passed either |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO there are to much either here 😄 , I think we can remove the "when passed either" here
docs/src/pages/docs/crocks/Either.md
Outdated
|
||
Like most other types in `crocks`, `Either` has a right bias in regard to | ||
instance methods like `map`, `ap` and `chain`. This behavior can be used to | ||
formally capture Error handling as the `Left` value will be maintained and most |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The most
here is a little confusing. Is it most of the future
or most important
or maybe I misunderstood 😄. Maybe we could remove it.
docs/src/pages/docs/crocks/Either.md
Outdated
`false` portion of a disjunction. The `Left` constructor takes a value of any | ||
type and returns a `Left` instance wrapping the value passed to the constructor. | ||
|
||
When an instance is a `Left`, most other methods `Either` returning methods on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most other methods Either returning methods
I think should be other Either returning methods
docs/src/pages/docs/crocks/Either.md
Outdated
accomplished with `chain`. `chain` expects a unary, `Either` returning function | ||
as its argument. When invoked on a `Left`, `chain` will not run the function, | ||
but will instead return another `Left` wrapping the original value. When called | ||
on a `Left` however, the inner value will be passed to provided function, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe: "the inner value will be passed to the provided function"
docs/src/pages/docs/crocks/Either.md
Outdated
``` | ||
|
||
Used as a means to map and extract a value from an `Either` based on the | ||
context. `either` takes two functions as its arguments. The first will map any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comma instead of point after context
maybe? Just to maintain the same style of the other ones.
docs/src/pages/docs/crocks/Either.md
Outdated
the [`First`][first]. | ||
|
||
The [`First`][first] datatype is based on a [`Maybe`][maybe] and as such its | ||
is fixed to a `()` type. As a means to allow for convenient |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add here (unit)
after ()
, the same we did before.
docs/src/pages/docs/crocks/Either.md
Outdated
original non-empty. | ||
|
||
The [`Last`][last] datatype is based on a [`Maybe`][maybe] and as such its left | ||
or empty value is fixed to a `()` type. As a means to allow for convenient |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add (unit)
here too after ()
?
@HenriqueLimas addressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This or That?
This PR adds the Either docs as requested in this issue.
Nothing too fancy, Just the same ol' stuff as the other docs PRs.
EDIT: Although, I did sneak in a few documentation 💄 and 💅 as I found them.