Stream: ideas

Topic: `List.has_any_match` and `List.for_each_try`


view this post on Zulip removewingman (Sep 04 2026 at 23:19):

Added List.for_each_try! here, if anyone can review: https://github.com/roc-lang/roc/pull/11096

I have never done a contribution to roc yet, hope this is fine, feel free to give feedback.

view this post on Zulip Notification Bot (Sep 05 2026 at 01:37):

A message was moved here from #contributing > Track remaining builtins for the Zig compiler by Luke Boswell.

view this post on Zulip Luke Boswell (Sep 05 2026 at 01:39):

These are new builtins, one is tracked in https://github.com/roc-lang/roc/issues/9596 as deferred and needs design, the other is a new proposal. Like we for all changes to the stdlib I have pulled this into a Zulip thread so we can discuss the details.

view this post on Zulip removewingman (Sep 05 2026 at 08:15):

I personally only care about the signature, the implementation can be changed , any thoughts or resistance against implementing these?

view this post on Zulip Anton (Sep 05 2026 at 13:01):

for_each_try! has been approved by Richard.

view this post on Zulip Anton (Sep 05 2026 at 13:02):

I also agree that the quality of the initial implementation does not matter that much.

view this post on Zulip Anton (Sep 05 2026 at 13:05):

For has_any_match, we already have List.any : List(a), (a -> Bool) -> Bool

view this post on Zulip removewingman (Sep 05 2026 at 13:55):

Anton said:

For has_any_match, we already have List.any : List(a), (a -> Bool) -> Bool

Thanks. Thoughts on renaming it to has_any_match?

view this post on Zulip Anton (Sep 05 2026 at 14:02):

match makes me think that you need to provide a value that will be checked for equality so I feel like it does not fit well when you need to provide a function returning a Bool

view this post on Zulip removewingman (Sep 05 2026 at 14:16):

Removed it. It is only List.for_each_try! now. Can anyone review or add it in another PR?

view this post on Zulip Anton (Sep 05 2026 at 14:21):

Reviewed :)


Last updated: Sep 24 2026 at 15:59 UTC