Efficiently process streams of data using lazy evaluation and bidirectional communication.
1sequence count_up(start, end):2 cycle from start to end as i:3 yield i45# Usage6cycle through count_up(1, 5) as n:7 declare("Count:", n)1sequence subtask():2 yield "a"3 yield "b"45sequence maintask():6 yield "start"7 delegate subtask() # Yields "a", "b"8 yield "end"910# Output: start, a, b, end1items := [1, 2, 3, 4, 5]23# Lazy squares4squares := (x * x for x through items)56# Filtered7evens := (x for x through items where x % 2 == 0)89cycle through evens as e:10 declare(e)