| kind | = | "Range" |
A range is a collection of two objects of the same kind. This Range can be either inclusive or exclusive.
- ==(other)
- ===(other)
- each([indexOrArgOrCode] nil, [argOrCode] nil, [code] nil)
- exclusive(from, to)
- exclusive?()
- from()
- include?(item)
- inclusive(from, to)
- inclusive?()
- inspect()
- notice()
- seq()
- to()
returns true if the argument is within the confines of this range. how this comparison is done depends on if the object mimics Comparing. If it does, < and > will be used. If not, all the available entries in this range will be enumerated using 'succ'/'pred' until either the end or the element we're looking for is found. in that case, comparison is done with '=='
takes either one or two or three arguments. if one argument is given, it should be a message chain that will be sent to each object in the range. the result will be thrown away. if two arguments are given, the first is an unevaluated name that will be set to each of the values in the range in succession, and then the second argument will be evaluated in a scope with that argument in it. if three arguments is given, the first one is an unevaluated name that will be set to the index of each element, and the other two arguments are the name of the argument for the value, and the actual code. the code will evaluate in a lexical context, and if the argument name is available outside the context, it will be shadowed. the method will return the range.