[Date Index]
[Thread Index]
[Author Index]
Re: How to think about Map[ ] ?
*To*: mathgroup at smc.vnet.net
*Subject*: [mg4678] Re: How to think about Map[ ] ?
*From*: "Seth J. Chandler" <SChandler at uh.edu>
*Date*: Thu, 22 Aug 1996 03:55:28 -0400
*Organization*: University of Houston Law Cen
*Sender*: owner-wri-mathgroup at wolfram.com
If you take the FullForm of the second argument to the Map function you may
gain some insight. Map preserves the head of the second argument while
wrapping its first argument around each part of the second argument. Thus,
in Map[f,a+b+c], what we have is Map[f,Plus[a,b,c]]. This in turn yields
Plus[f[a],f[b],f[c]], which when written in the ordinary way is
f[a]+f[b]+f[c].
Similarly, by way of illustration Map[f,a/b/c] is
Map[f,Times[a,Power[b-,1],Power[c,-1]]. Map preserves the head of the
second argument (Times) while wrapping itself about a, Power[b,-1], and
Power[c,-1]. Thus, you get Times[f[a],f[Power[b,-1]],f[Power[c,-1]]], which
when displayed in ordinary way is what Mathematica outputs.
Hope this is helpful.
Seth J. Chandler
Associate Professor of Law
University of Houston Law Center
AES <siegman at ee.stanford.edu> wrote in article
<4ve91p$l93 at dragonfly.wolfram.com>...
> I can understand that
>
> Map[f,{a,b,c}] --> {f[a], f[b], f[c]}
>
> But would someone want to give a little tutorial on how to understand
> the (what seem to me) bizarre results I get when I try various
> combinations like
>
> Map[f, a + b + c]
>
> Map[f, a + b - c]
>
> Map[f, a * b * c]
>
> Map[f, a / b / c]
>
> and other more complex forms. (I'm particularly confused by the
> difference between the * * and the / / cases. I'm not acquainted
> with LISP, and have never encountered any other form of mathematics
> that operates as Map seems to.)
>
> Thanks...
>
>
>
>
==== [MESSAGE SEPARATOR] ====
Prev by Date:
**Re: --->What is the problem with 'ParametricPlot'?**
Next by Date:
**Re: binary file i/o**
Previous by thread:
**How to think about Map[ ] ?**
Next by thread:
**Re: How to think about Map[ ] ?**
| |