Piping into a lambda with -> should work right?
» lst.map(|_| "zzz ").join_with(" ").trim()->(|trimmed_str| {if trimmed_str.is_empty() "" else "bla"})
**PARSE ERROR**
A parsing error occurred: `expr_arrow_expects_ident`
This is an unexpected parsing error. Please check your syntax.
it should!
but we probably never supported it
I can implement this later today.
fixed in https://github.com/roc-lang/roc/pull/9197
Thanks Luke :)
I added a complex pipeline demo to the all syntax example: #9199
Do we also want to support calling the lambda in the arrow dispatch? Like:
» lst.map(|_| "zzz ").join_with(" ").trim()->(|trimmed_str| {if trimmed_str.is_empty() "" else "bla"})()
(Notice the () in the end)
Related: #9372
Hi @ugi,
I just tried your example in the repl and that already works. Did I misunderstand your question?
Just wanted to make sure if this style should be supported.
I guess since it works in the repl, then that implies that it should also be supported.
Though the formatting for such styles does not work, therefore the related issue.
Yeah, I think disallowing it seems overly strict, so we should make the formatter support it.
Last updated: May 01 2026 at 12:45 UTC