Hacker News new | ask | show | jobs
by dragonwriter 1587 days ago
> If the language implements them as lazy iteration

JS doesn't, though.

> then I think take_until would be effectively equivalent to break

JS also doesn't have take_until.

1 comments

>JS also doesn't have take_until.

I just assumed it was a new method coming out soon! Although when I was thinking of how I would make a method I just thought an until method that iterated all elements of an array outputting them until it got the return from the callback that was passed as the iteration stopper - default value null.