blob: 7627f480fa9c39761de7e0f0311d2fa7b2d5bcd2 [file] [log] [blame]
## examples/repeat.av
## require aviatorscript >= 5.2
let list = repeat(10, "a");
p("type of list: " + type(list));
p("count of list: " + count(list));
p("list[0]=" + list[0]);
p("list is: " + list);
let c = 0 ;
let counter = lambda() ->
c = c + 1;
return c;
end;
let list = repeatedly(10, counter);
p("type of list: " + type(list));
p("count of list: " + count(list));
p("list[0]=" + list[0]);
p("list is: " + list);