-
-
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
Improve Chain
Documentation
#4386
Conversation
I see git diff handles the section reorg poorly. I can back out that part if that eases review. |
NonEmptyChain.fromChainAppend(Chain.empty[Int], 1) | ||
NonEmptyChain.fromChainPrepend(1, Chain(2, 3)) | ||
``` | ||
[nec]: @API_LINK_BASE@/cats/data/index.html#NonEmptyChain:cats.data.NonEmptyChainImpl.type |
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 what the mdoc var is for. Laika can't link to this, but this seemed like a reasonable approximation of linking without hardcoding too much.
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.
Laika's own ${vars} also don't work in links, I tried that first 🤷♂️
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.
Laika can't link to this
If you have a moment, might be good to open an issue for this in Laika.
- note that concat is also constant time - add mention of groupByNec since it does exist, but it has no scaladoc
- add a little more meat to the intro paragraph - add header for the motivation section - call out Chain being a binary tree - typos and formatting
- turns out you can change the title with @:api
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.
Overall LGTM, thanks for all your work on this, including the new benchmarks!
NonEmptyChain.fromChainAppend(Chain.empty[Int], 1) | ||
NonEmptyChain.fromChainPrepend(1, Chain(2, 3)) | ||
``` | ||
[nec]: @API_LINK_BASE@/cats/data/index.html#NonEmptyChain:cats.data.NonEmptyChainImpl.type |
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.
Laika can't link to this
If you have a moment, might be good to open an issue for this in Laika.
Well, `Vector` has its own problems and in this case it's unfortunately not that much faster than `List` at all. You can check [this blog post](https://www.lihaoyi.com/post/BenchmarkingScalaCollections.html#vectors-are-ok) by Li Haoyi for some deeper insight into `Vector`'s issues. | ||
|
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'm not sure how relevant that blog post is for the 2.13 collections Vector
. Maybe to 2.12, not sure.
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.
It will be interesting to see how relevant Chain remains after 2.13.11 Vector updates.
Anyone have new thoughts on this? Otherwise I'll merge in a day or two, it's just docs after all. Edit: where by "just" I mean it's not going to affect our compatibility guarantees 😜 |
- this link is not working. When embedded in the markdown link, Chain loses capitalization, and gets redirected.
Was starting on the links for other pages today, and I can't get the link format I was using before to work :S |
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.
Thank you so much for your on-going work on Cats Docs 🥰
This PR updates the Chain documentation to include links to API docs & other sections of the local site, as part of #2862
NonEmptyChain
, which is an alias forNonEmptyChainImpl
.