I've always thought it would be nice to have a List.split_if in addition to List.split_on.
This would be:
split_if : List(a), (a -> Bool) -> List(List(a))
Vs:
split_on : List(a), a -> List(List(a))
This obviously adds a lot more versatility. I am currently working to add many of the List builtins that were present in the rust compiler. Is there reason not to include split_if, in addition to split_on?
Last updated: Jun 16 2026 at 16:19 UTC