Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #30841
| References | <727ec5d8-d292-4012-ba87-da77a1040c6a@googlegroups.com> |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | 2012-10-05 15:31 -0600 |
| Subject | Re: fmap(), "inverse" of Python map() function |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1873.1349472728.27098.python-list@python.org> (permalink) |
On Fri, Oct 5, 2012 at 2:19 PM, vasudevram <vasudevram@gmail.com> wrote:
>
> http://jugad2.blogspot.in/2012/10/fmap-inverse-of-python-map-function.html
Your fmap is a special case of reduce.
def fmap(functions, argument):
return reduce(lambda result, func: func(result), functions, argument)
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
fmap(), "inverse" of Python map() function vasudevram <vasudevram@gmail.com> - 2012-10-05 13:19 -0700
Re: fmap(), "inverse" of Python map() function Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-05 15:31 -0600
Re: fmap(), "inverse" of Python map() function Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-05 15:43 -0600
Re: fmap(), "inverse" of Python map() function Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-10-05 18:52 -0400
Re: fmap(), "inverse" of Python map() function Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-05 17:24 -0600
Re: fmap(), "inverse" of Python map() function Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-10-05 19:30 -0400
Re: fmap(), "inverse" of Python map() function vasudevram <vasudevram@gmail.com> - 2012-10-06 11:57 -0700
Re: fmap(), "inverse" of Python map() function vasudevram <vasudevram@gmail.com> - 2012-10-06 15:07 -0700
Re: fmap(), "inverse" of Python map() function vasudevram <vasudevram@gmail.com> - 2012-10-06 15:07 -0700
Re: fmap(), "inverse" of Python map() function vasudevram <vasudevram@gmail.com> - 2012-10-06 11:57 -0700
csiph-web