MathGroup Archive 2008

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

Search the Archive

Re: easier method for Flatten[Position[list2,x_x...??

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94117] Re: easier method for Flatten[Position[list2,x_x...??
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Fri, 5 Dec 2008 05:31:28 -0500 (EST)
  • References: <gh0jlg$5mu$1@smc.vnet.net> <200812020542.AAA19156@smc.vnet.net> <gh8hhs$qui$1@smc.vnet.net>

Hi,

> On Dec 1, 2008, at 10:42 PM, Jens-Peer Kuska wrote:
> 
>> list1 = {a, b, b, e};
>> list2 = {{a, aP}, {b, bP}, {c, cP}, {d, dP}, {e, eP}, {f, fP}};
>>
>> list1 /. Rule @@@ Select[list2, MemberQ[list1, First[#]] &]
> 
> Is there an easier way than looking up every Mathematica instruction  
> that might be relevant for finding out what instruction shorthand  
> like "@@@" represents?  The obvious "?@@@" fails. (I finally found  
> that it's a special case of Map, but only after checking all of the  
> other things listed by "?Map*" because Map itself seemed least likely.)

Probably one of the good things about the documentation center: type @@@
into the input field, press return and you will be at the page for
Apply, where you can search for @@@ to learn:

f@@@expr is equivalent to Apply[f,expr,{1}].

hth,

albert


  • Prev by Date: assignment problem solved
  • Next by Date: Re: Re: Re: easier method for
  • Previous by thread: Re: easier method for Flatten[Position[list2,x_x...??
  • Next by thread: Re: Re: Re: easier method for