Chaim Frenkel <[EMAIL PROTECTED]> writes:
> >>>>> "RLS" == Randal L Schwartz <[EMAIL PROTECTED]> writes:
>
> RLS> We really need a clean way to distinguish those four cases:
>
> RLS> "yes" and keep going
> RLS> "no" and keep going
> RLS> "yes" and abort after this one
> RLS> "no" and abort after this one
>
> RLS> What would you have "last" do? And how would you distinguish "the
> RLS> other one"?
>
> Either last has to be extended with a return value or a new keyword
> is needed. I'm quite partial to yield. Which might be overloaded
> to work with lazy lists, continuations, and short-circuiting.
>
> yield EXPR - stop what I am doing now and give something else a
> a chance to do its things. And while you are doing
> that please take this EXPR from me.
When you put it this way, isn't C<yield> spelled C<return> in Perl5?
(Except, of course, that C<return> inside a C<grep> does a whole lot
more nowadays).
--
Ariel Scolnicov |"GCAAGAATTGAACTGTAG" | [EMAIL PROTECTED]
Compugen Ltd. |Tel: +972-2-5713025 (Jerusalem) \ We recycle all our Hz
72 Pinhas Rosen St. |Tel: +972-3-7658514 (Main office)`---------------------
Tel-Aviv 69512, ISRAEL |Fax: +972-3-7658555 http://3w.compugen.co.il/~ariels