robrix / Madness

Recursive Descent Into Madness
MIT License
291 stars 17 forks source link

Add some interesting combinators that build on alternation over sequences #82

Closed sharplet closed 9 years ago

sharplet commented 9 years ago

Let me preface this by saying that may agenda here was ultimately to build the anyOf() combinator for my own purposes — I don't know if this is the kind of thing you want to be included in Madness core! But along the way I discovered some interesting and fun things, and if any of them fit then feel free to cherry-pick just those. I've got what I was looking for. :innocent:

A brief summary:

Thanks for the great library, this was a lot of fun! Looking forward to your feedback. :blush:

robrix commented 9 years ago

Whoa, fun! Thanks for the PR.

none() resolves #35, so thanks for that too :smile:

robrix commented 9 years ago

Basically all of these are awesome and you are awesome and I am very grateful :bow:

Just the one question, really; this is golden :star:

sharplet commented 9 years ago

Thanks for the lovely comments @robrix, glad you liked it! Took me quite a lot of wading through complex index-munging logic beforeI realised that I could use flatMap, and magically everything just got simpler. :open_mouth:

Ready when you are.

sharplet commented 9 years ago

Oh btw, something else I considered was adding <^> to wrap >>- + pure(). But that could be another PR.

robrix commented 9 years ago

<^> in another PR sounds great!

robrix commented 9 years ago

:tada:

I’ve added you as a collaborator @sharplet. Same as on Set, PRs & review preferred for nontrivial stuff, but you can tag releases and review and such now too if you like.

robrix commented 9 years ago

Also: :star: for your branch name.

sharplet commented 9 years ago

:grin: