Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!

Idiom #316 Count occurrences in a list

Determine the number c of elements in the list x that satisfy the predicate p.

  
c=count(p(x))

p has to be an elemental function with an argument of the type of x.

New implementation...