kachayev/fn.py — pull request #35 by microamp (2013-09-27 05:36:32+00:00)
Title: Additional functions in fn.iters

Additional functions to be added to `fn.iters` (influenced by Underscore.js):
* `compact`: filter out falsey items from iterable
* `reject`: the opposite of filter
* `groupby`: saner approach to itertools.groupby
* `countby`: similar to groupby, but instead of sub-iterator, it yields a count for the number of items in each group

Unit tests added. Tested with Python 2 (2.7) and Python 3 (3.3).

Thanks for reviewing in advance. Any feedback, positive or negative, would be highly appreciated.

Cheers,
James