I am trying to go through this Wolfram Blog example: http://blog.wolfram.com/2009/02/12/flag-analysis-with-mathematica/ on country flag analysis.
I am having a problem understanding the following piece of code:
countryColors =
(# -> Catch[Intersection[
StringSplit[
If[Head[#] === Missing, Throw[""], #]& @
CountryData[#, "FlagDescription"]],
colorNames]]) & /@ CountryData[];
where colorNames
is just a list of colors.
I do not understand &@
in the above piece of code. What I know is that &
is used to define a pure function, and @
is used as a Prefix.
If, for example, the If
yields true, then it returns a country name. What does it mean to have &@
after that?
f[#]&@a
works likef[a]
. Herea
isCountryData[...
. $\endgroup$