First of all, congratulations to everyone working on roc. I'm having the most fun programming with this language, which is something I haven't experienced in quite some time.
For my actual question: is there an alternative to List.walk which uses its first element as the initial state?
Something like:
reduce: List elem, (elem,elem->elem) -> Result elem [ListWasEmpty]
I do like this kind of reduce from scala, I don't think we've talked about this before, I could not find it at least, you would not believe how many times we've used the word "reduce" in our zulip history :p
Would you be interested in writing up a tiny proposal @Dilson Higa?
I am interested but I don't really know how. I searched the history and found a few proposals (such as the "task as builtin"), but I believe the proposal for this function would be waaaay simpler. Maybe a brief motivation with use cases and the proposal itself?
Yeah those are big proposals, we typically use the ideas channel for proposals for new builtin functions like reduce. This is a good example of a short proposal.
Thank you @Anton . I posted it there. Let's see if there is enough interest in it.
Last updated: Jul 05 2025 at 12:14 UTC