-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Revamp Functor, Applicative, Traverse doc #1513
Conversation
Current coverage is 92.26% (diff: 100%)@@ master #1513 diff @@
==========================================
Files 246 246
Lines 3763 3763
Methods 3638 3637 -1
Messages 0 0
Branches 125 126 +1
==========================================
- Hits 3476 3472 -4
- Misses 287 291 +4
Partials 0 0
|
* Left identity: Zipping a value on the left with unit results in something ismorphic to the original value | ||
* `pure(()).product(fa) ~ fa` | ||
* As an equality: `pure(()).product(fa).map(_._2) = fa` | ||
* Right identity: Zipping a value on the right with unit results in something ismorphic to the original value |
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.
s/ismorphic/isomorphic, same 3 lines up
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.
Fixed!
462e1df
to
7fb02b4
Compare
List(1,2,3).map(_ + 1) | ||
Vector(1,2,3).map(_.toString) | ||
``` | ||
* Composition: Mapping with `f` and then again with `f` is the same as mapping once with the composition of `f` and `g` |
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.
oops there should be "then again with g
" here
|
||
## Using Functor | ||
## Functors compose |
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.
now this section looks like this
Functors Compose
we can compose either with compose or with nested
compose example
nested example
compose notes
nested notes
how about this instead?
Functors Compose
we can compose either with compose or with nested
compose
compose example
compose notes
nested
nested example
nested notes
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.
Good idea, will do
At no point do we manually pass in or thread a `SparkContext` through - that is taken care for us | ||
by the (applicative) effect of `Reader` and therefore by `traverse`. | ||
|
||
## Sequencing |
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.
Since the Traverse
tutorial starts with Future.sequence
, is it still worth mentioning the sequence
method in Traverse
?
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.
Will do
|
||
### Playing with `Reader` |
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.
I found this section is another good example of Reader
, how about we move it the kleisli.md instead of losing it?
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.
Hm how about I go back to this when I (or someone else) gets around to revisiting the Reader tut? I don't want to just tack on this section at the end since one of the reasons I'm revisiting these docs is to try to make them more cohesive.
7fb02b4
to
636d6df
Compare
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 is really nice. Thanks! 👍
This looks great to me. 👍 |
Thanks for the review all! Merging now. |
After PR typelevel#1513 there's no such page.
No description provided.