-
Notifications
You must be signed in to change notification settings - Fork 0
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
Solutions Chapter 1 #1
Conversation
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.
Great job! 👍🏼 Congrats with finishing Chapter ONe 🥳
Keep up the great work 👌🏼
-- DON'T FORGET TO SPECIFY THE TYPE IN HERE | ||
lastDigit n = error "lastDigit: Not implemented!" | ||
lastDigit :: Integral n => n -> n | ||
lastDigit = (`mod` 10) . abs |
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.
Nice point free style 💯
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.
Yes, that's elegant. However, to me the alternative with explicit arguments is sometimes easier to grasp than the point free one, especially when infix notation is used.
I guess to a certain degree it will get better if I get used to it, but probably it makes sense to not use point free style sometimes
Co-authored-by: Veronika Romashkina <[email protected]>
* Avoid name clashing with `last` from Prelude * use `divMod`
Co-authored-by: Veronika Romashkina <[email protected]>
Thank you for your detailed feedback! |
No problems, @L7R7 🤗 |
Solutions for Chapter 1
cc @vrom911 @chshersh
Since I already know Haskell, some of the solutions are different than what one would expect from a beginner. Looking forward to receiving your feedback!