count
ABSTRACT
counts the amount of elements in a vector that satisfy a given predicate
PARAMETERS
v | the vector that gives the list of elements of which the predicate will be applied to |
predicate(x) | the user-provided predicate function, which should return 0 if the given element should not included in the total tally, and any other number otherwise |
RETURN
the amount of elements that matched the predicate. For an empty vector, the count will always be zero
DECLARATION
func count(v, predicate(x))