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

Stevemao w11 #135

Merged
merged 6 commits into from
Oct 26, 2019
Merged

Stevemao w11 #135

merged 6 commits into from
Oct 26, 2019

Conversation

stevemao
Copy link
Member

No description provided.

deriving Show

parseSExpr :: Parser SExpr
parseSExpr = spaces *> noSpace <* spaces
Copy link
Member

Choose a reason for hiding this comment

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

nit:
Does p1 *> p <* p2 mean p between p1 and p2? if so, it seems like we can have a parser called between.


parseSExpr :: Parser SExpr
parseSExpr = spaces *> noSpace <* spaces
where noSpace = toN posInt <|> toI ident <|> char '(' *> oneOrMoreSExprs <* char ')'
Copy link
Member

Choose a reason for hiding this comment

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

nit:
With between parser, we can build a parser called inBrackets and use it here.

@shineli1984 shineli1984 merged commit b2862ae into master Oct 26, 2019
@shineli1984 shineli1984 deleted the stevemao-w11 branch October 26, 2019 16:42
cht8687 added a commit to cht8687/2019-winter-Haskell-school that referenced this pull request Oct 27, 2019
* 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)
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