You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some use cases in the collection functions area where it would be beneficial if a user could provide some kind of user defined function for extracting values. I'm proposing to add a Function type for this purpose that has two type parameters, input and output type. Collection functions could then use that type as argument type. Syntax-wise I would allow the user to provide a custom name for the input i.e. the following: priceHistory.sum(entry -> entry.price). Not sure yet if a short-hand syntax is a good idea, but maybe we could allow priceHistory.sum(#price).
The text was updated successfully, but these errors were encountered:
There are some use cases in the collection functions area where it would be beneficial if a user could provide some kind of user defined function for extracting values. I'm proposing to add a Function type for this purpose that has two type parameters, input and output type. Collection functions could then use that type as argument type. Syntax-wise I would allow the user to provide a custom name for the input i.e. the following:
priceHistory.sum(entry -> entry.price)
. Not sure yet if a short-hand syntax is a good idea, but maybe we could allowpriceHistory.sum(#price)
.The text was updated successfully, but these errors were encountered: