继承自 Enumerable
用上、下边界描述一个对象区域。
Property | Type | Kind | Description |
start | (any) | instance | range的下边界 |
end | (any) | instance | range的上边界 |
exclusive | Boolean | instance | 决定边界自身是不是range的一部分。 |
Method | Kind | Arguments | Description |
[ctor](start, end, exclusive) | constructor | start: the lower bound, end: the upper bound, exclusive: include the bounds in the range? | 创建一个range对象,从start生成到end,这里要注意的是,start和end必段类型一致,而且该类型要有succ()方法。 |
include(searchedValue) | instance | searchedValue: value that we are looking for | 检查一个value是不是在range中。 |