/** * tally.c * Yay! Make C more like Scheme. */ // +---------+-------------------------------------------------------- // | Headers | // +---------+ #include "tally.h" // +-----------+------------------------------------------------------ // | Functions | // +-----------+ int tally_strings (char *strings[], int size, int (*pred)(char *str)) { int i; int count = 0; for (i = 0; i < size; i++) if (pred (strings[i])) ++count; return count; } // tally