When using Roc on some old Advent of Code problems, I ran into a couple List methods that would be nice to have on Iter. Specifically, a version of first that would automatically deal with Skips, and something like keep_oks or a 'filter_map'.
Are QoL Iter methods like that already planned somewhere, and/or would PRs for that kind of thing be welcome?
oh I think first should just automatically deal with skips :thinking:
keep_oks sounds good :+1:
happy to accept a PR for it!
I'm opening a PR adding Iter.first (I was remembering the behavior of Iter.next before), and a PR for running the doctests for builtins. The first one is straightforward, but I'm not sure what the right approach is for the testing change.
https://github.com/roc-lang/roc/pull/12256
https://github.com/roc-lang/roc/pull/12265
Could you add a fuzz target using roc-fuzz to test it maybe?
Ive got a lot of targets for the builtins, and that has been helpful to find issues.
Fuzzing the builtins makes sense to me! The immediate question is about whether the existing doc tests should go through the interpreter and/or the dev backend.
My guess is either is ok
Last updated: Nov 04 2026 at 18:54 UTC