On Oct 17, 11:45 pm, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > [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.
Perhaps, but I think you'll need a better use-case than this :) Actually, would a c-version be much faster? -- Paul Hankin -- http://mail.python.org/mailman/listinfo/python-list