You can use 'find' itself as an 'each'. Do whatever you each would do
before checking the stop condition and return true when your stop condition
is met. Then drop what you found if you don't need it.

On Sun, Sep 22, 2019, 6:21 AM Alexander Ilin <ajs...@yandex.ru> wrote:

> I use `loop` or `while`, depending on the details.
>
> 22.09.2019, 13:05, "KUSUMOTO Norio" <kusum...@na.rim.or.jp>:
> > Hello all,
> >
> > 'each 'and' 2each 'are very useful for writing iterative processes, but
> sometimes
> > I want to get out of a process before repeating it to the end under
> certain conditions.
> >
> > I think it would be possible to write such a combinator because 'find'
> stops iterating
> > when it finds something that satisfies the condition, but I don't know
> how to write
> > 'each' that can escape.
> >
> > What code do you write for such a process?
> > I use 'with-return' to handle such situations. But I suspect it's
> costing time.
>
> ---=====---
>  Александр
>
>
>
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to