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

Week10/task3 4 #152

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open

Week10/task3 4 #152

wants to merge 41 commits into from

Conversation

cht8687
Copy link
Member

@cht8687 cht8687 commented Oct 27, 2019

No description provided.

* upstream/master:
  Solution for homework 1 (fp-works#12)
  update readme to include knowledge points and setup
  Week2-Task1 (fp-works#19)
  wk2 ex 1 (fp-works#22)
  Update README.md
  Add why zehua is so good
  week2 Exercise 1 (fp-works#17)
  add hanoi (fp-works#14)
  Week2 wip (fp-works#20)
* upstream/master:
  Week 3 exercises (fp-works#43) (fp-works#46)
  improved ex1 wk3 with list applicative (fp-works#44)
  Week 3 exercises (fp-works#43)
  Daniel Deng - Week 03 (fp-works#41)
  steve exercise 2 (fp-works#42)
  week3 ex 1 skips first attempt (fp-works#38)
  DanielM Week 2 solutions (fp-works#36)
  Week 2 Homework solution (fp-works#37)
  Tasks2, Task3, Task4, Task5 (fp-works#32)
* upstream/master:
  wk4 ex1 (fp-works#52)
  Daniel Deng Week 04 (fp-works#53)
  add test command
* 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)
* 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)
* upstream/master:
  generalize Num (Stream a) instance (fp-works#87)
  Fix Week6 nits (fp-works#86)
  week 6 (fp-works#85)
  Week6 (fp-works#83)
  Fix warnings in week 1-5 (fp-works#84)
  Daniel M Week 5 (fp-works#81)
  Update README.md
  Week5-T1,T2,T3,T4 (fp-works#77)
  Wei Ning CIS194 Week 5 homework (fp-works#80)
  Daniel Deng Week04 - Exercise 02 ~ 04 (fp-works#79)
  Fix some nits (fp-works#78)
  Week5 Ex 1, 2, 3, 4, 5 (fp-works#67)
  Week4 (fp-works#70)
* upstream/master:
  Update README.md
  Update README.md
  Week 7 Ex 2,3 (fp-works#107)
  W7steve (fp-works#106)
  08-IO.pdf
  week8
  Delete function-composition-cheatsheet.md
  week6-task5 (fp-works#105)
  Function Composition Cheatsheet (fp-works#104)
* upstream/master:
  Minor fixes for week 4 and 6 (fp-works#138)
  Week 3: simplify and shorten histogram (fp-works#134)
  week3 exercises by reference (fp-works#131)
  [Week7]-Task3..[Week10]: Task1, Task2 (fp-works#142)
  Week 10 Ex 1-2 (fp-works#139)
  Week10 and Week 11 (fp-works#137)
* upstream/master:
  Week6f (fp-works#150)
  Week5f (fp-works#149)
  Week4f (fp-works#148)
  Daniel M Week11 (fp-works#147)
  Daniel M - Week 10 (fp-works#146)
  Week 10 & Week 11  (fp-works#145)
  Stevemao w11 (fp-works#135)
  Week10 (fp-works#136)
  Week 10 fix nits (fp-works#143)
abParser = (,) <$> char 'a' <*> char 'b'

abParser_ :: Parser ()
abParser_ = (\a b -> ()) <$> char 'a' <*> char 'b'
Copy link
Contributor

Choose a reason for hiding this comment

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

Here as @stevemao suggested before, can use void. Also can just reuse abParser.


intOrUppercase :: Parser ()
intOrUppercase =
((\x -> ()) <$> posInt) <|> ((\x -> ()) <$> satisfy (isUpper))
Copy link
Contributor

Choose a reason for hiding this comment

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

Here could also apply void instead of (\x -> ()).

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