MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Map, List

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55095] Re: [mg55066] Map, List
  • From: Chris Chiasson <chris.chiasson at gmail.com>
  • Date: Sat, 12 Mar 2005 02:36:43 -0500 (EST)
  • References: <200503110920.EAA02174@smc.vnet.net>
  • Reply-to: Chris Chiasson <chris.chiasson at gmail.com>
  • Sender: owner-wri-mathgroup at wolfram.com

I don't know why many things in Mathematica are functions. However, it
certainly makes things convenient. One thing to remember is that many
operations which may traditionally be applied (lol, unintended pun) to
lists, such as map or append, are easily applied to arbitrary
functions.


On Fri, 11 Mar 2005 04:20:42 -0500 (EST), Steve Gray
<stevebg at adelphia.net> wrote:
>         I wanted to convert
> 
> {a,b,c} to
> {{a},{b},{c}}, (just an example)
> 
> and it occured to me that since List[xx] = {xx}, I could do
> 
> ml=Map[List,{a,b,c}] and get
> ml={{a},{b},{c}},
> 
> making List in this case the inverse of Flatten. Now,assuming a,b,c have appropriate integer values,
> I can do
> 
> Delete[ggon, ml]
> 
> where ggon is a list from which I want to delete an arbitrary set of list members.
> 
> Of course this worked. My only problem is that I might  not have thought of this obvious (in
> retrospect) operation. Using List as a function is not mentioned in any of my several books. What
> general principle applies that makes all such things functions?
> 
> Thank you.
> 
> Steve Gray
> 
> 


-- 
Chris Chiasson
Kettering University
Mechanical Engineering
Graduate Student
1 810 265 3161


  • References:
    • Map, List
      • From: Steve Gray <stevebg@adelphia.net>
  • Prev by Date: Re: Re: Nested iterators in Compile
  • Next by Date: Re: how to set a global assumption setting Every Varaible I use is Real?
  • Previous by thread: Map, List
  • Next by thread: Re: Map, List