aboutsummaryrefslogtreecommitdiff
path: root/examples/for.fco
blob: 9710fe2560262823d67b049db6295cecc92693f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
# recursive for loop
def for(n fn)
    if >(n 0)
        fn(n)
        @for(-(n 1) fn)
    end
end

def main()
    for(10000 display)
end