[Aldor-l] empty Generator?
Ralf Hemmecke
ralf at hemmecke.de
Thu Feb 15 08:46:46 EST 2007
> The only way I can imagine a work around would be do the partialNext! as
> below, then rebuild the original generator (perhaps using the Generator:
> concat: List(%) -> %
> function)
>
> a bit dirty I know! but might be some help?
Well if I just want to implement "empty?(g)" (since there is no such
function) using partialNext! then I would have to step the generator g.
That is a destructive operation on g. Then I would have to rebuild the
old g somehow without modifying the memory address of g (since there
might be other places where g is used). Generator just doesn't have that
functionality (not that I know of) to do such a destructive rebuild of
the orginal g, i.e. to do a push back.
I do not desparately want "empty?" to exist, but perhaps it is already
there an the compiler/library just doesn't give access to it. I simply
don't know. But I thought that perhaps someone with more knowledge of
the compiler could tell me.
Ralf
More information about the Aldor-l
mailing list