On Thu, 17 Mar 2016 02:20 am, Random832 wrote:
> How about:
>
> from functools import partial, reduce
> from operator import mul
> def rcall(arg, func): return func(arg)
> def fpipe(*args): return reduce(rcall, args)
> pfilter = partial(partial, filter)
> pmap = partial(partial, map)
> preduce = partial(partial, reduce)
>
> fpipe("abcd12345xyz", pfilter(str.isdigit), pmap(int), preduce(mul))
Intriguing! Thank you for the suggestion.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list