Skip to content

What is the role of keys in function all_true_by_key? #336

Answered by 3togo
3togo asked this question in Q&A
Discussion options

You must be logged in to vote

Finds if all of the values of an input array are true according to an array of keys. All values corresponding to each group of consecutive equal keys will be tested to make sure all are true. Keys can repeat, however only consecutive key values will be considered for each reduction. If a key value is repeated somewhere else in the keys array it will be considered the start of a new reduction. There are two outputs: the reduced set of consecutive keys and the corresponding final reduced values. An example demonstrating the reduction behavior can be seen in the following snippet.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by 3togo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant