Skip to content
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

Week1 #62

Merged
merged 5 commits into from
Sep 6, 2019
Merged

Week1 #62

merged 5 commits into from
Sep 6, 2019

Conversation

hvariant
Copy link
Contributor

@hvariant hvariant commented Sep 5, 2019

latecomer catching up with homework

Copy link
Member

@shineli1984 shineli1984 left a comment

Choose a reason for hiding this comment

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

Because we are trying to produce production level code in Haskell, I added some nits about styling. Hopefully this helps.

Good work!

cis194/week1/zhansongl/credit_card.hs Show resolved Hide resolved
cis194/week1/zhansongl/credit_card.hs Show resolved Hide resolved
cis194/week1/zhansongl/credit_card.hs Show resolved Hide resolved
padList (x:xs) = (x:0:padList xs)

doubleEveryOther :: [Integer] -> [Integer]
doubleEveryOther = reverse . doubleEveryOtherRev . reverse
Copy link
Member

Choose a reason for hiding this comment

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

Given we are going to sum the digits after double every other digits from the right, do we need to reverse the list back?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, if the only goal is to finish validate, then I suppose there is no point in reversing the list back. For the sake of this exercise though, if the list is returned in reverse it doesn't satisfy the requirements.

@shineli1984
Copy link
Member

I'll merge this for now and if you want to address the comments, you can create another PR.

@shineli1984 shineli1984 merged commit e0f6aff into fp-works:master Sep 6, 2019
@hvariant hvariant deleted the week1 branch September 6, 2019 14:23
stevemao added a commit that referenced this pull request Sep 8, 2019
* master:
  Week2 fix (#72)
  Week 5 ex 1 with updates to Parser and StackVM (#68)
  Week3 (#66)
  improve skips in week3 ex 1 (#69)
  steve week 5 (#63)
  Week2 (#65)
  Improve week1 homework based on feedback in #62 (#64)
  Week1 (#62)
  Daniel M Week 4 (#61)
  Exercise 3: More folds! (#60)
  Week 4 Ex 2,3 (#58)
cht8687 added a commit to cht8687/2019-winter-Haskell-school that referenced this pull request Sep 9, 2019
* upstream/master:
  Week1 (fp-works#62)
  Daniel M Week 4 (fp-works#61)
  Exercise 3: More folds! (fp-works#60)
  Week 4 Ex 2,3 (fp-works#58)
  init week5
  week4 ex 2,3,4 (fp-works#54)
  Wei Ning - CIS194 Week4 Homework (fp-works#59)
  [Week4]: Task1 (fp-works#56)
  Daniel M Week 3 (fp-works#57)
  Week 3 Ex 3 + Week 4 Ex 1 (fp-works#55)
  Task2  (fp-works#50)
cht8687 added a commit to cht8687/2019-winter-Haskell-school that referenced this pull request Sep 9, 2019
* upstream/master:
  Week 5 ex 2 to 6 (fp-works#76)
  week 5: use applicative and composition styles (fp-works#75)
  W5steve (fp-works#73)
  Week5 (fp-works#71)
  fix symbol alignment style (fp-works#74)
  Week2 fix (fp-works#72)
  Week 5 ex 1 with updates to Parser and StackVM (fp-works#68)
  Week3 (fp-works#66)
  improve skips in week3 ex 1 (fp-works#69)
  steve week 5 (fp-works#63)
  Week2 (fp-works#65)
  Improve week1 homework based on feedback in fp-works#62 (fp-works#64)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants