expressing variant when using iterators
hello
here's my problem. I'm iterating on items of a DICTIONNARY. Here's the
scheme i use :
it : ITERATOR[E]
set : DICTIONNARY[E,K]
from
it := set.get_new_iteator_on_items
it.start
until
it.is_off
loop
do_something...
it.next
end
i would like to express (using a variant) that the number of elements
left to be computed is decreasing at each iteration. But i've no idea on
how to do it (i searched in both ITERATOR and DICTIONNARY class without
success). Is it possible ? I would like to write something like
variant
it.left
but such a function does not exist in class ITERATOR, nor it does in any
of its descendant (according to smarteiffel online docs, i'm using
smarteiffel 1.0).
thanks for your help
julien
|