NumEx v0.1.0 Count View Source

A module to count various parameters in a given Enumerable.

Link to this section Summary

Functions

Takes an enumerable and counts all non-zero elements from it

Link to this section Functions

Link to this function count_nonzero(l) View Source
count_nonzero(list()) :: integer()

Takes an enumerable and counts all non-zero elements from it.

Examples

iex> Count.count_nonzero([1,0,9,0,3,0,5])
4