Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Why no & operation? #450

Unanswered
riyueniao asked this question in Q&A
Discussion options

Why there isn't an operation like the following code.

// for same input, `p & q` succeeds if `p` succeeds and `q` succeeds. 
def & [U >: T](q: => Parser[U]): Parser[U] = ???
You must be logged in to vote

Replies: 1 comment

Comment options

I'm not sure, but it isn't clear to me which result should be returned. The type signature suggests that q's result would be returned, but that seems like an arbitrary choice that would surprise some users.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /