I know Roc is strict and the compiler does loop fusion, but is there short circuiting in cases like list map a |> filter b |> find c
?
As in, do functions a and b execute only until 'find' returns?
the compiler doesn't do fusion at all yet, although I definitely would like it to in the future! :big_smile:
Oh! And is there a vision for short-circuiting, or it would require some special user-space types and functions?
I'm not familiar with the implementation details of fusion, but I'd hope that could Just Work as long as there were no dbg
or expect
s in a
or b
- being able to safely do optimizations out that is one of the advantages of having a pure language!
Karakatiza has marked this topic as resolved.
Last updated: Jul 06 2025 at 12:14 UTC