[Python-ideas] Add 'composable' decorator to functools
Ivan Levkivskyi
levkivskyi at gmail.com
Wed May 6 18:55:16 CEST 2015
Dear Chris,
> > My original idea was to make the composable functions auto-curried
(similar
> > to proposed here
> > http://code.activestate.com/recipes/52902-function-composition/ as
pointed
> > out by Steve) so that
> >
> > my_fun = square @ add(1)
> > my_fun(x)
> >
> > evaluates to
> >
> > square(add(1,x))
> It also requires that
> the right hand function be
> composable, unlike in your earlier
> example.
This is true. One can only use single argument "normal" functions. Multiple
argument ones should be made "composable".
>
> ChrisA
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150506/7e3b728b/attachment.html>
More information about the Python-ideas
mailing list