mostly-adequate-guide
mostly-adequate-guide copied to clipboard
[Chapter 12] Traverse is taken out of the blue
In Chapter 12, traverse
is presented out of the blue.
sequence
is explained, but in the section Type Feng Shui, traverse is not explained.
You mean, not explained like in "There's a full section about it also giving implementation details" :smile: ?
I believe it's fine on this one :+1: . Maybe it could deserve a small note in brackets like
traverse (detailed in the next section)
Or something like this. Happy to take PRs :smiley:
Sorry for the poor explained issue. 😞 I end up writing it on a hurry.
In section Type Feng Shui, it starts saying: The Traversable interface consists of two glorious functions: sequence and traverse.
, which creates an expectation that traverse
would be explained.
Then in section Effect Assortment, there is an example, a little bit more high-level than the ones presented for sequence
in the begin of Type Feng Shui.
When I arrived at this part I did not understand what traverse behaviour was and its motivation. I end up looking for other articles explaining it, specifically this one.
Finally, I understand this issue is a result of my experience reading the book and maybe it was not an issue for other people. In general, the experience reading this book has being very satisfatory and I really appreciate what you guys have done! 😄
Going again through reading, it could deserve a small line of introduction indeed. Even before diving into what sequences is.
I'm having a really hard time understanding traverse. I understand the type signature in that it's like map but it will wrap the values inside the functor instead of wrapping the functor itself, but I still don't understand it well enough to come up with a valid implementation and examples.
Unfortunately the link provided is dead, I will link a webarchive link below for reference:
https://web.archive.org/web/20201023080122/https://sidburn.github.io/blog/2016/04/14/sequence-and-traverse