Oops! My mistake, I forgot the islice; it should be the=lambda pred,seq: list(itertools.islice(itertools.ifilter(pred,seq),0,1)) in such a way that we exit at the first hit, otherwise one could just use the standard "filter". not-yet-good-enough-with-itertools-but-improving-ly your's Michele