API Reference for Enthought Tool Suite 3.0.1
Non-standard higher-order functions
compose(f,g,...,h)(*args, **kw) == f(g(...(h(*args, **kw))))
>>> compose(len, str)(100) 3 >>> compose(len, str, len, str)(1234567890) 2 >>> compose()(1) 1 >>> map(compose(sum, range, len), ['foo', 'asdf', 'wibble']) [3, 6, 15]
© Copyright 2002-2008 Enthought, Inc.