Navigation
Synopsis Returns the list 0,1..n-1.
Function list[int] upTill(int n)
Usage import List;
Description Returns the list 0, 1, .., n-1, this is slightly faster than [0..n], since the returned values are shared.
Examples
rascal>import List;
ok
rascal>upTill(10);
list[int]: [0,1,2,3,4,5,6,7,8,9]

Questions
Question [1].
The type of upTill(2) is

Question [2].
upTill(2) == 

Question [3].
size(upTill(2)) == 



Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.