loom
1#{ initial_value : null } type
2Range =
3{
4end : 0,
5counter : 0,
6__init__ : fn [Range] (int : b, int : e) -> Range
7{
8def Range : range
9
10range.end = e
11range.counter = b - 1
12
13return range
14},
15__iterator__ : fn (Range : range)
16{
17range.counter += 1
18return [range.counter, range.counter < range.end]
19}
20}
21
22for int : i in Range(1,5)
23print i
24
25print "Done"
26