-
Notifications
You must be signed in to change notification settings - Fork 745
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
Implement the spread ...
operator, other new functions, and indices on lambdas
#13658
Conversation
Test this change out locally with the following install scripts (Action run 8808567201) VSCode
Azure CLI
|
0116b3d
to
3b87b56
Compare
...
operator...
operator, other new functions, and indices on lambdas
3b87b56
to
841a869
Compare
841a869
to
5742989
Compare
...
operator, other new functions, and indices on lambdas...
operator, other new functions, and indices on lambdas
9797667
to
71e5e63
Compare
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.
@anthony-c-martin Is the syntax example of
When testing this locally, I'm getting a syntax issue with the required |
Oops, this should be: var example = reduce([ 2, 3, 7 ], 0, (cur, next, i) => (i % 2 == 0) ? cur + next : cur) // returns 9 I've updated the original comment. |
@anthony-c-martin I could not find the documentation for the new function features published yet but there are examples here in this PR. However for one of the main reasons to have index for lambda functions was to be able to access resource arrays and I have found out that this is not possible. Any idea why this was not done? It seems only half of the job was done.
shows error:
|
Adds the spread operator
...
as well as various new functions + indexes on lambdas:objectKeys
: Returns the keys of an object parameter:mapValues
: Create an object from an input object, using a custom lambda to map values:groupBy
: Create an object with array values from an array, using a grouping condition:shallowMerge
: Perform a shallow merge of input object parameters:map
:reduce
:filter
:Closes #13560
Closes #9244
Closes #1560
Addresses some of the issues described under the following: #2082, #1853, #387
Microsoft Reviewers: Open in CodeFlow