/** * tally.h * Yay! Make C more like Scheme. */ #ifndef __TALLY_H__ #define __TALLY_H__ /** * Procedure: * tally-strings * Parameters: * strings, an array of strings * size, an integer * pred, a function from strings to integers * Purpose: * Count strings that meet pred. * Produces: * tally, an integer * Preconditions: * strings contains at least size strings * pred does not affect its parameter * Postconditions: * There are exactly tally indices i s.t. pred (strings[i]) */ int tally_strings (char *strings[], int size, int (*pred)(char *str)); #endif // __TALLY_H__