A function in LENS can be an iterator returning a possibly infinite IEnumerable<T> instance:
IEnumerable<T>
fun loop<T>:T~ (items:T~ count:int) -> for i in 0..count do for item in items do yield item
The same could also be written more conscisely using the yield from syntax, that yields all results from a sub-sequence:
yield from
fun loop<T>:T~ (items:T~ count:int) -> for i in 0..count do yield from items
There was an error while loading. Please reload this page.