[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [plt-scheme] Return from do

Lo, on , June 6, Paulo J. Matos did write:

> Hi all,
> How can I get out of do before iteration ends?
> In CL I use return and return-from, how can I do it in PLT
> Scheme?

Without knowing the context, I can't necessarily give you the best
answer.  There are several possibilities; you might check out

The question does come to mind, though, of why you are using do.  It's
part of Scheme, true, but I don't think that using it is a particularly
Scheme-like solution.  There may be other ways to express the same
function that don't use do, in which case your `early exit problem' will
likely take care of itself.  Again, though, without knowing context,
it's a little hard to be specific.