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

Classlib: Fix 2 issues regarding Rest and patterns #941

Merged
merged 2 commits into from
Sep 21, 2013
Merged

Classlib: Fix 2 issues regarding Rest and patterns #941

merged 2 commits into from
Sep 21, 2013

Conversation

jamshark70
Copy link
Contributor

  1. It's reasonable to write Rest({ 5.rand }) or Rest(Pseries(1, 1, inf).asStream), but this wasn't supported before. Now you can.
    1a. A possible refinement would be to create the Rest with ^super.new(dur.asStream) -- this is probably a good idea, but I'm not sure, so I'm keeping it out of this pull request for now.
  2. A Pcollect's function may return a Rest, so it should call processRest on that result. (At first, I thought this might also be needed for Pselect and Preject, but these patterns only suppress output values, not alter them. Rests should already have been 'process'ed by the input stream.)

James Harkins added 2 commits August 19, 2013 14:30
Necessary because the collect func may return a Rest.
Previously, this Rest was not 'process'ed, breaking
math operations on the return value.

At first, I thought this might also be needed for
Pselect and Preject, but these patterns only suppress
output values, not alter them. Rests should already
have been 'process'ed by the input stream.
danstowell added a commit that referenced this pull request Sep 21, 2013
Classlib: Fix 2 issues regarding Rest and patterns
@danstowell danstowell merged commit 414361e into supercollider:master Sep 21, 2013
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