-
Notifications
You must be signed in to change notification settings - Fork 192
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
Ch 7 - Review tree show instance and solutions #232
Comments
I'll make a PR to fix this. I'm thinking of including a hint that this can be done with generic (along with a link to the guide) to make this optionally more interesting, since this exercise is really just a repeat of content from the previous chapter. The generic solution will be shown commented-out next to the hand-written solution. I agree about the ambiguity of |
Yeah I see what you mean, but the problem is that if the exercise is ambiguous to begin with and you first have to "fail" to get it right, as a beginner that's not a great experience. I think this should be solved with a hint of the expected output still. Say you correctly implement the show instance, but it isn't acceptable because it doesn't match perfectly with the test suite. As a beginner you really start wondering where you went wrong instead and doubt yourself. Maybe it's just me, but I start questioning if I screwed up instead of realizing "oh yea, it's cause the test is just for an arbitrary implementation". I guess what I'm saying is the first thing you notice is the failed status, not why the failure happened and that's just not good beginner experience. |
@razcore-art, let me know what you think of #235 |
The exercise is:
The solution is implemented using generics. By this point
derive
isn't discussed not to mention generics. There's discussion to include at leastderive
in Ch6 #149, but not generics. Thus the solutions should be "manual" solutions.Also the implementation of the show instance is pretty subjective so the reader needs a bit more details on how the solution should look like otherwise he's forced to look at the test suite. Including an output example would do the trick, something like:
(Branch (Branch Leaf 5 Leaf) 4 (Branch Leaf 6 Leaf))
or something like that maybe.The text was updated successfully, but these errors were encountered: