stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

[RFC]: add `@stdlib/iter/cuevery`

Open kgryte opened this issue 1 year ago • 2 comments

Description

This RFC proposes adding the package @stdlib/iter/cuevery, which cumulatively tests whether every iterated value is truthy. The function should be a transform iterator, continuing to iterate while source iterator values are available.

var array2iterator = require( '@stdlib/array/to-iterator' );

var arr = array2iterator( [ true, true, true, false, true ] );

var it = iterCuEvery( arr );

var v = it.next().value;
// returns true

v = it.next().value;
// returns true

v = it.next().value;
// returns true

v = it.next().value;
// returns false

v = it.next().value;
// returns false

var bool = it.next().done;
// returns true

Related Issues

No.

Questions

No.

Other

  • See also @stdlib/iter/every

Checklist

  • [X] I have read and understood the Code of Conduct.
  • [X] Searched for existing issues and pull requests.
  • [X] The issue name begins with RFC:.

kgryte avatar Jun 08 '24 00:06 kgryte

I'd like to work on this. @kgryte

RidamGarg avatar Jun 25 '24 07:06 RidamGarg

Sounds good! Thanks for volunteering to work on this, @RidamGarg!

kgryte avatar Jun 25 '24 07:06 kgryte

i would liketo work on this issue kindly assign this to me

Dipti0704 avatar Jul 17 '24 13:07 Dipti0704

@kgryte please assign it to @Dipti0704 not getting much time to work on this. Thank You!

RidamGarg avatar Jul 17 '24 13:07 RidamGarg

Done. @Dipti0704 Please feel free to submit a PR implementing this feature.

kgryte avatar Jul 17 '24 17:07 kgryte

thanks for assigning.. i will soon raise a pr sir

Dipti0704 avatar Jul 17 '24 17:07 Dipti0704

i am working on this will pr in ~24h

adityacodes30 avatar Sep 27 '24 10:09 adityacodes30