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
- References:
- Re: easier method for Flatten[Position[list2,x_x...??
- From: Jens-Peer Kuska <kuska@informatik.uni-leipzig.de>
- Re: easier method for Flatten[Position[list2,x_x...??