This feels like a really silly question, but how do you define a function with no arguments?
So in roc, there is no such thing. That would just be a constants. That said, if you want lazy evaluation, the standard is to make a function that takes an empty record as the argument:
lazySlowCompute = \{} -> ...
Last updated: Jul 06 2025 at 12:14 UTC