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
pipe
behaves unintuitively with by
#710
Comments
Is anyone reading these issues? I can write a PR for this if I know it'll get merged... otherwise won't waste my time. |
@AlexBaranosky Please feel free to submit a PR but I think @pyr is best equipped to judge if this is actually an issue. |
Hey, Thanks for the nudge. The issues are read but summer sees less OSS involvment on my side :-) I'm not sure what you mean by "full evaluated" in the above gist. Moving event-window by itself works, if you skip (test-stream (pipe - (moving-event-window 2 -)
(smap folds/sum -)
(split (even? metric) (with :state :even -)
(with :state :odd -))
[{:metric 1} {:metric 2} {:metric 3}]
[{:metric 1 :state :odd} {:metric 3 :state :odd} {:metric 5 :state :even}]) This returns true as expected. |
Do to the way
pipe
macro expands into a series oflet
bindings, something like this will not work as you'd hope/expect:One solution is re-implement
pipe
to always expand to something like:Swiss-arrows'
-<>
is similar to pipe except you can't choose themarker
... and it isn't in reverse order .... but the code could be borrowed and tweaked to get it to macro expand like the above.The text was updated successfully, but these errors were encountered: