Fix distance-based filter not working

Fixes #21
The problem was that `reduce` passes extra arguments to
its parameter and that someone had "helpfully" did an
eta-reduction in that part of the code