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

Add chain, else* and cond* #71

Closed
wants to merge 4 commits into from
Closed

Add chain, else* and cond* #71

wants to merge 4 commits into from

Conversation

pyr
Copy link
Contributor

@pyr pyr commented Nov 15, 2012

Three functions to help build more concise streams.

  • chain is a dummy function which helps you jump to a different
  • cond* acts as a cond-like equivalent in streams
  • else* is nice as the default operation for cond*

@pyr
Copy link
Contributor Author

pyr commented Dec 5, 2012

@aphyr,

Thanks for the review.

First about cond_, like your cond and condp, but I still think there should be a generic cond_ when you
want arbitrary fns, I meant to build cond on top of cond*, i can do that in a later PR if you want.

As for pipe, I like the pipeline idea, a lot. This is what i wanted to express with chain and how I am using it.
What I do that seems harder to express with a pipeline is skipping some steps which jumping allows me to do.

I'm not sure pubsub is as natural to read so I would be wary of using that.

I'm a bit worried about macro hell to be honest, and I think finding a way to decouple the predicate and filter funcs from call-rescue would be nice before moving on with this work. maybe by having streams wrap each of its forms, what do you think ?

@aphyr aphyr closed this Dec 6, 2012
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.

None yet

2 participants