Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2009

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

Search the Archive

Re: How to make {f,g}[a,b,c] to become

  • To: mathgroup at
  • Subject: [mg105336] Re: [mg105301] How to make {f,g}[a,b,c] to become
  • From: Bob Hanlon <hanlonr at>
  • Date: Sat, 28 Nov 2009 01:07:54 -0500 (EST)
  • Reply-to: hanlonr at

Outer[#2[#1] &, {a, b, c}, {f, g}]

{{f[a], g[a]}, {f[b], g[b]}, {f[c], g[c]}}

Outer[CountryData[#1, #2] &, CountryData[],
  {"Name", "GDP", 
   "Population"}] ==
 ({CountryData[#, "Name"], 
     CountryData[#, "GDP"],
     CountryData[#, "Population"]} & /@ CountryData[])


Bob Hanlon

---- Lawrence Teo <lawrenceteo at> wrote: 

I have a question. How to make {f,g}[a,b,c] to become {{f[a],g[a]},{f

I want to do {GPD, Population} for all countries.

Something similar to the following...
{CountryData[#, "GDP"] &, CountryData[#, "Population"] &} /@

It ends up in the form of {f,g}[a,b,c,d,...]. I need a way to
'distribute' the country name into the GDP and Population portion.


  • Prev by Date: Re: RevolutionPlot3D: Specifying the axis of rotation
  • Next by Date: Re: How to make {f,g}[a,b,c] to become
  • Previous by thread: Re: ListPointPlot3D - how to join points
  • Next by thread: Re: How to make {f,g}[a,b,c] to become