Comments (7)
Apologies for putting this all under one issue no. I'd made the list as I was going through the book and only now realised there was a git repo. Going forward I will raise issues individually.
from scala-with-cats.
No worries! Thanks very much for your help!
I'm doing bug fixes on the feature/bugfixes
branch right now (well... tomorrow at this rate).
I'll edit the original issue description to include checkboxes and work through it. If there's anything I can't fix immediately, I'll raise another issue.
from scala-with-cats.
Hi @lJoublanc. Thanks very much - I've done a first pass on your points in 5454487. There's loads of good feedback in there! I've put some comments below where I either had further questions, wanted to elaborate further, or disagreed with a point and wanted to explain why:
2.5.5 or pg 261 - Wouldnt it make more sense to use a Semigroup and NonEmptyList instead of Monoid? Having an empty Order doesn't make much sense.
I'm not sure I agree with this one. IMO the natural zero for an order from, say, Amazon, is to not buy anything: 0 quantity, 0 price.
p. 81 Diagram supposed to show many-to-one flatMap is actually many-to-many, contrary to the description.
The diagram looks ok to me, but it's probably down to interpretation. Is your issue the number of circles and stars in the lists on the left, middle, and right?
I've kind of mixed some metaphors here. On the one hand, the number of items in the list icon is supposed to be insignificant: three icons are meant to simply represent "a list of some length".
However, I've often found in training sessions that people get confused between the List[B] returned by the flatMap function and the List[B] returned by flatMap itself. I removed a star from the former of the two to clarify that the two lists are not the same. But now it looks like the number of stars has a significance, so I guess I should add a fourth star to the right to indicate that the lists can get longer.
What do you think?
Writer monad exercise crashes, when sequencing futures (no idea why):
Welcome to Scala 2.12.3 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_101)
This looks suspiciously like a binary compatibility issue. Make sure you're using compatible versions of Scala and Cats. I'll add a section to the start of the book on versions, but I don't think it'll help with your situation here.
page 276 If tailRecM is not tail-recursive, will it still be stack-safe? Explain this.
My solution here was actually completely wrong. It is possible to make this method tail-recursive---it's just tricky to write. You have to use a List
as an explicit stack to replace the call stack. I've updated the text to:
- include the non-tail-recursive solution and the tail-recursive solution;
- add a short discussion on the effects of non-tail-recursive
tailRecM
(which are basically that Cats becomes non-stack-safe).
pg 186 "OF"
I can't see this one. I think it's gone in the latest text. I could be mistaken, though.
from scala-with-cats.
Hi Dave,
I'm not sure I agree with this one. IMO the natural zero for an order from, say, Amazon, is to not buy anything: 0 quantity, 0 price.
This is a perfect example - yes, mathematically this makes sense - but have you tried entering an order for zero items on amazon ..? Anyway not a big deal, I just thought it would be better suited to a Semigroup example.
The diagram looks ok to me, but it's probably down to interpretation. Is your issue the number of circles and stars in the lists on the left, middle, and right?
Yes exactly, this is what was confusing me. Now that you've explained it, I agree with you. As you said, it's a matter of interpretation.
Re: the future sequencing issue, It's probably my setup. I think I may also have had fs2 in my dependencies, pulling in a different version of cats altogether ...!
Re: tailRecM, the explanation you've added seems much clearer to me now, as you've elaborated on whether it needs to be tail recursive or not, and given both examples.
Can't wait to see the final version!
from scala-with-cats.
from scala-with-cats.
May I close this off? I think most of the remaining unaddressed issues don't exist any more as the text has changed considerably.
from scala-with-cats.
Absolutely. Sorry for my tardiness in replying. Sometime soon I'll reserve a few days to go through all these books and close off as many issues as I can.
from scala-with-cats.
Related Issues (20)
- Writer example seems incorrect HOT 1
- Reformat `Readers` as `Reader`s, etc? HOT 1
- Confounding example on `MonadError.handleError` HOT 2
- Exercise should have consistent heading level
- Overview of Cats Effect.
- Describe important types in `cats.data`
- Consider pulling validated material into a separate section
- Describe `Parallel` type class
- Getting error trying to build Docker image HOT 3
- Copypaste issue in example 6.2 Apply Syntax HOT 2
- Update examples for contramap
- Section title not rendering corectly HOT 1
- content of case study :CRDTs got unexpected result HOT 3
- Update cats-seed.g8
- Better implicitly example
- Validated type section is not present in Chapter 6 HOT 4
- Suggestion for improvement to email check in Validation case study
- Misleading Figure 3.7 - Function1 Contramap HOT 1
- Status on scala with cats 2? HOT 3
- Check epub works in Kindle App
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scala-with-cats.