-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Labels
✨ enhancementNew feature or requestNew feature or request💡 languageLanguage designLanguage design💬 discussionFurther discussion is neededFurther discussion is needed
Milestone
Description
Remove the sum builtins (and replace by stdlib functions)
Since it's not overloaded and requires an explicit type with a custom syntax sum money of [...], this built-in could easily be replaced by per-type stdlib functions: Money.sum content money depends on l content list of money, etc.
In this new context there is no real justification for a custom syntax.
Find in a list using a predicate
This is a pretty common operation, but it requires a predicate which is not possible at the moment with stdlib functions. At the moment, this is how it can be done:
let candidates equals
list of element among lst such that predicate of element
in
List.first_element of candidates
This returns an optional as expected; but it is a bit verbose, which obfuscates the point.
Depending on how common this really is, it should be considered to add a new builtin such as:
find element among lst such that predicate of element
More
This is open for discussions and more suggestions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
✨ enhancementNew feature or requestNew feature or request💡 languageLanguage designLanguage design💬 discussionFurther discussion is neededFurther discussion is needed
Type
Projects
Status
Todo