On Wed, 2 Mar 2022 at 10:27, Steven D'Aprano <st...@pearwood.info> wrote:
> Off-topic, but since you raised the issue... is there a standard > functional programming term for a variant of map() that applies a single > argument to a series of different functions? > > # regular map > map(func, list_of_args) # (func(arg) for arg in list_of_args) > > # variant map? > map(arg, list_of_funcs) # (func(arg) for func in list_of_funcs) That sounds like what I've heard referred to as "map apply". I don't think functional languages tend to have a particular name for it, because it falls naturally out of the syntax for mapping and functional application. (And as you show, Python is similar - the generator comprehension is easy enough that a named function is not often useful). Paul _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/TZI6ZX2PYE6MDADDLPTBUUVPFNYPGEJK/ Code of Conduct: http://python.org/psf/codeofconduct/