Hello,

@Martin Maechler:
%until% and %while% use R's builtin repeat function. Something like

do(expr) %until% (cond)
repeat {
    expr
    if (cond)
        break
}

are identical. After %until% and %while% check the arguments look correct,
it makes a call to repeat like above and evaluates it in the same
environment as %until% or %while% was called from. I haven't completely
reinvented the wheel here.
%until% and %while% are slower than repeat, but only by a microsecond or
two.
Admittedly, my documentation for %until% and %while% is dog water compared
to repeat, but I've tried to make it as clear as possible in my
documentation that %until% and %while% use repeat,
and included the link to the documentation for repeat.


@Duncan Murdoch:
I'll try renaming the arguments, thank you for the suggestion. Also, I
didn't realize you could put R comments in \usage with #, so I might try
that as well, thank you!

        [[alternative HTML version deleted]]

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to