-
Notifications
You must be signed in to change notification settings - Fork 67
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 map function #4806
Add map function #4806
Conversation
9977402
to
7e6986d
Compare
c3cfdca
to
eadfee5
Compare
94924cf
to
f9343e4
Compare
MapCall struct { | ||
Kind string `json:"kind" unpack:""` | ||
Expr Expr `json:"expr"` | ||
Inner Expr `json:"inner"` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a downside to using Call
rather than adding MapCall
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its kind of a different thing than a call. A call is made of args that you get the value of all by passing this
into it, a map call you evaluate this, then iterate over each value an call the inner eval on each value. So I kind of think this should remain MapCall
The map function that applies a function to every element in an array or set value. Also: rename the map aggregator to collect_map to avoid collision with this new function. Closes #4610
Co-authored-by: Noah Treuhaft <[email protected]>
Co-authored-by: Noah Treuhaft <[email protected]>
Co-authored-by: Noah Treuhaft <[email protected]>
The map function that applies a function to every element in an array or set value.
Also: rename the map aggregator to collect_map to avoid collision with this new function.
Closes #4610