> You cannot re-do function above using each().
Well, you *can*, but given the richness of the Enumerable API, you're
not likely to need to -- as you point out, any() is exactly what you
want in the situation you describe, and if it weren't then all(),
detect(), or collect() would probably suit.
On Oct 9, 12:23 pm, "T.J. Crowder" <[EMAIL PROTECTED]> wrote:
> Or, if there's a situation where any() or all() doesn't suit, you can
> break each() loops by throwing $break.
Yes I can do it, but I cannot determine afterwards whether I've exited
iteration with throwing $break or I've iterated thr
Or, if there's a situation where any() or all() doesn't suit, you can
break each() loops by throwing $break.
--
T.J. Crowder
tj / crowder software / com
On Oct 9, 10:04 am, Tomasz Kalkosiński <[EMAIL PROTECTED]>
wrote:
> Nah! I've just discovered Enumerable.any() and Enumerable.all(). That
> shou
Nah! I've just discovered Enumerable.any() and Enumerable.all(). That
should do the trick.
Sorry for hassle
Greetings,
Tomasz Kalkosiński
On Oct 9, 10:47 am, Tomasz Kalkosiński <[EMAIL PROTECTED]>
wrote:
> I'm refactoring old code and I use Enumerable.each() wherever
> possible. I've came to p