NAME ^

src/classes/CardinalRange.pir - methods for the CardinalRange class

DESCRIPTION ^

Methods ^

VTABLE_get integer (vtable method)

VTABLE_get_number (vtable method)

VTABLE_get_string (vtable method)

ACCEPTS(topic)

Determines if topic is within the range or equal to the range.

clone() (vtable method)

Create a clone of the CardinalRange.

from()

to()

Gets the beginning or end of the range.

to_a

 Generates and returns this range as an array. This will eventually be refactored w/ the other Enumerable methods This will eventually be refactored w/ the other Enumerable methods.
iterator() (vtable method)

Return an iterator for the CardinalRange. Since CardinalRanges are already iterators, we can just return a clone.

list()

Generate the CardinalRange in list context. Currently we generate all of the elements in the range; when we have lazy lists we can just return a clone of the CardinalRange.

min()

minmax()

max()

Return first element in CardinalRange. Will later be refactored as part of the Enumerable module.

Return first element in CardinalRange.

Return first element in CardinalRange.

Return last element in CardinalRange. Will later be refactored as part of the Enumerable module.

Return last element in CardinalRange.

Return last element in CardinalRange.

Return true if the parameter is located with this CardinalRange

Return true if the parameter is located with this CardinalRange 1.9 does a succ on the last element if it isnt a integer, so this doesnt work

Return True if the parameter is a member of this CardinalRange

pop() (vtable_method)

Generate the next element at the end of the CardinalRange.

shift() (vtable_method)

Generate the next element at the front of the CardinalRange.

true()

Return true if there are any more values to iterate over.

each(block)

Run block once for each item in self, with the item passed as an arg.

Operators ^

infix:<..>

infix:<...>

Construct a range from the endpoints.

Private methods ^

!from_test(topic)

!to_test(topic)

Returns true if topic is greater than .from / less than .to, honoring exclusive flags.


parrot