Reading about list pattern matching in Roc https://www.roc-lang.org/tutorial#pattern-matching-on-lists
Is it possible to bind the rest to a variable?
when list is
[a, b, c, d, ..rest] ->
I'm pretty sure that is not supported. I recall it being discussed somewhere, I'll see if I can dig a reference out for you.
Zulip discussion here if you want to read more about it. :smiley:
If your interested the seamless slices is pretty neat, you can also read more about it in Richard's design doc.
thanks
Last updated: Jul 06 2025 at 12:14 UTC