From: Marco Antoniotti
Subject: Naming a function (the symmetric of MAP)
Date: 
Message-ID: <QhQIe.20$DJ5.65993@typhoon.nyu.edu>
Hi

this may be a stupid question, but I have a function that is the 
"symmetric" of MAP.

(defun foo (result-type x funs)
    (map result-type (lambda (f) (funcall f x)) funs))

What is an "accepted" name for FOO?  I'd call it DISTRIBUTE, but I am 
not sure about it.

Cheers
--
Marco

From: Sam Steingold
Subject: Re: Naming a function (the symmetric of MAP)
Date: 
Message-ID: <umznw6pbs.fsf@gnu.org>
> * Marco Antoniotti <·······@pf.alh.rqh> [2005-08-05 16:49:52 -0400]:
>
> this may be a stupid question, but I have a function that is the
> "symmetric" of MAP.

PAM is the symmetric image of MAP

> (defun foo (result-type x funs)
>     (map result-type (lambda (f) (funcall f x)) funs))
>
> What is an "accepted" name for FOO?  I'd call it DISTRIBUTE, but I am
> not sure about it.

MAP-FUNCALL

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.palestinefacts.org/> <http://www.mideasttruth.com/>
<http://www.jihadwatch.org/> <http://www.iris.org.il>
Someone has changed your life.  Save? (y/n)
From: Pascal Bourguignon
Subject: Re: Naming a function (the symmetric of MAP)
Date: 
Message-ID: <87d5osw014.fsf@thalassa.informatimago.com>
Marco Antoniotti <·······@cs.nyu.edu> writes:
> this may be a stupid question, but I have a function that is the
> "symmetric" of MAP.
>
> (defun foo (result-type x funs)
>     (map result-type (lambda (f) (funcall f x)) funs))

My first idea would be to name it OPERATE.


> What is an "accepted" name for FOO?  I'd call it DISTRIBUTE, but I am
> not sure about it.

I'm not sure either.  

Distributivity is a property of two functions:
   (+ (* a b) (* a c)) = (* a (+ b c))



funcall: (f1)(x1)                       = ( (f1 x1) )
or apply

map:     (f1)(x1 x2 ... xn)             = ( (f1 x1) (f1 x2) ... (f1 xn) )

?:       (f1 f2 ... fm)t (x1)           = ( (f1 x1) )
                                          ( (f1 x2) )
                                          (   ...   )
                                          ( (f1 xm) )

?:       (f1 f2 ... fm)t (x1 x2 ... xn) = ( (f1 x1) (f2 x1) ... (fm xn) )
                                          ( (f1 x2) (f2 x2) ... (fm x2) )
                                          (   ...           ...         )
                                          ( (f1 xn) (f2 xn) ... (fm xn) )

I would generalize the four cases and use MAP, or MAT*, or OPERATE for
all.  Perhaps you could name arbitrarily your FOO: MAPCALL and the
later case could be called FUNMAP or MAPMAP.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Grace personified,
I leap into the window.
I meant to do that.
From: Marco Antoniotti
Subject: Re: Naming a function (the symmetric of MAP)
Date: 
Message-ID: <1123292951.677153.232810@o13g2000cwo.googlegroups.com>
Pascal Bourguignon wrote:
> Marco Antoniotti <·······@cs.nyu.edu> writes:
> > this may be a stupid question, but I have a function that is the
> > "symmetric" of MAP.
> >
> > (defun foo (result-type x funs)
> >     (map result-type (lambda (f) (funcall f x)) funs))
>
> My first idea would be to name it OPERATE.
>
>
> > What is an "accepted" name for FOO?  I'd call it DISTRIBUTE, but I am
> > not sure about it.
>
> I'm not sure either.
>
> Distributivity is a property of two functions:
>    (+ (* a b) (* a c)) = (* a (+ b c))
    ...
>
> I would generalize the four cases and use MAP, or MAT*, or OPERATE for
> all.  Perhaps you could name arbitrarily your FOO: MAPCALL and the
> later case could be called FUNMAP or MAPMAP.
>

I guess MAPCALL would work.  I agree that DISTRIBUTE may be
problematic.  What about
MULTIPLEX instead?

Cheers
--
Marco
From: Thomas F. Burdick
Subject: Re: Naming a function (the symmetric of MAP)
Date: 
Message-ID: <xcvll3fo35f.fsf@conquest.OCF.Berkeley.EDU>
"Marco Antoniotti" <·······@gmail.com> writes:

> I guess MAPCALL would work.  I agree that DISTRIBUTE may be
> problematic.  What about
> MULTIPLEX instead?

While it doesn't have any nice mathyness about its name, MAPCALL tells
you what it does, so I'd go for that.

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | Free Mumia Abu-Jamal! |
     ,--'    _,'   | Abolish the racist    |
    /       /      | death penalty!        |
   (   -.  |       `-----------------------'
   |     ) |                               
  (`-.  '--.)                              
   `. )----'