stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

[RFC]: add `@stdlib/array/base/cunone`

Open kgryte opened this issue 1 year ago • 2 comments

Description

This RFC proposes adding the package @stdlib/array/base/cunone, which cumulatively tests whether every array element in a provided array is falsy. The function should return a new generic array. The package should also provide an #assign API for setting output values in a provided output array.

var x = [ false, false, false, true, false ];

var y1 = cunone( x );
// returns [ true, true, true, false, false ]

var y2 = [ false, null, false, null, false, null, false, null, false, null ];
var out = cunone.assign( x, y2, 2, 0 );
// returns [ true, null, true, null, true, null, false, null, false, null ]

where the assign API supports an offset and stride (see, e.g., @stdlib/array/base/take).

Both APIs should support accessor arrays (see, e.g., @stdlib/array/base/take).

Related Issues

No.

Questions

No.

Other

No.

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 07 '24 23:06 kgryte

I'd like to work on this !

adityacodes30 avatar Jun 16 '24 10:06 adityacodes30

@adityacodes30 Assigned.

kgryte avatar Jun 16 '24 19:06 kgryte