[Paul Hankin] > def lastdetector(iterable): > t, u = tee(iterable) > return izip(chain(imap(lambda x: False, islice(u, 1, None)), > [True]), t) Sweet! Nice, clean piece of iterator algebra. We need a C-speed verion of the lambda function, something like a K combinator that consumes arguments and emits constants. Raymond