Skip to content

Conversation

@jacksjm
Copy link
Owner

@jacksjm jacksjm commented Oct 1, 2020

Solutions for Chapter 1

cc @vrom911 @chshersh

Copy link

@vrom911 vrom911 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great start of the course 🌟
And well done with the advanced task 👍🏼

src/Chapter1.hs Outdated
firstDigit n = error "firstDigit: Not implemented!"
firstDigit :: Int -> Int
firstDigit n
| div n 10 == 0 = n
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are almost there! 💪🏼 This is a nice solution, however, it won't work on the negative input.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did putting the abs on, but I feel it can be reduced

@chshersh
Copy link

chshersh commented Oct 2, 2020

@jacksjm Nice work on Chapter One! This PR is ready for merge 🏁

@jacksjm jacksjm added the hacktoberfest-accepted Accepted for hacktoberfest, will merge later label Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted Accepted for hacktoberfest, will merge later

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants