
On Wed, 2 Mar 2022 at 10:27, Steven D'Aprano <steve@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