I am about to write an arithmetics for matlab.
Now I try to include the colon operator, i.e. to define the function colon for my class of numbers.
What do I have to do to implement the colon function? I know that the return type is a so called range
and for me as a java programmer it looks very much like an iterator,
i.e. an object allowing the functions hasnext(.) and next(.).
Please give me a hint on how to do it.