Version 06. of the functional package has been pushed out to PyPI and the project’s own website. This release features:

  • functional.flip will now reverse all non-keyword arguments, as opposed to simply reversing the first two as it did in version 0.5.

  • functional.compose now comes with an optional unpack parameter to make up for some of the differences between Python and Haskell (which inspired most of the functional package), namely that Haskell functions are fully curried and Python functions usually aren’t.

    The unpack parameter means that you can now do something like this with compose:

    f(*g(*arg,**kw))

    i.e., automatically unpacking g’s return value and passing the result to f.

    To get this functionality, you’d write something like

    compose(f, g, unpack=True)(*args, **kwargs)
  • Add weakref support to flip and compose objects in the C version.

  • Sundry performance improvements for the C implementation.