I was wondering how I would go about doing list comprehension in roc. As a problem I was working on would benifit from describing a list where i can pull items off it.
Wouldn't list comprehensions be some form of List.map
?
True! Maybe a map with index?
I realize the error in my explanation, what i was looking for was building lazy lists.
Hi @Sky,
We don't have builtin lazy list support but you can construct your own. Can you share what specifically you are trying to do? I may be able to recommend a non lazy solution.
Last updated: Aug 17 2025 at 12:14 UTC