Returns the range from 0 to self-1.

assert 3.times == [0..3[
assert 10.times == [0..10[
assert ((-1).times).is_empty

This can be usefull for loops:

var s = new Array[String] for i in 3.times do s.add "cool" assert s.join(" ") == "cool cool cool"

Property definitions

core :: range $ Int :: times
	# Returns the range from 0 to `self-1`.
	#
	#     assert 3.times == [0..3[
	#     assert 10.times == [0..10[
	#     assert ((-1).times).is_empty
	#
	# This can be usefull for loops:
	#
	#    var s = new Array[String]
	#    for i in 3.times do s.add "cool"
	#    assert s.join(" ") == "cool cool cool"
	fun times: Range[Int] do return [0 .. self[
lib/core/collection/range.nit:241,2--252,44