Re: can't find info about & /@ %
- To: mathgroup at smc.vnet.net
- Subject: [mg121919] Re: can't find info about & /@ %
- From: Richard Cohen <cohenrich at gmail.com>
- Date: Thu, 6 Oct 2011 04:25:42 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201110050759.DAA06921@smc.vnet.net> <C7E3ECB5-F08B-4C79-BA06-CCA5CCA2A4E1@gmail.com>
hi, thanks for all the help. first off i've only been learning mathematica for just a couple of days and working my way through some of the getting started tutorials. my interest is in image processing so i jumped ahead and was playing with some of the sample notebooks. i think that is where i got myself into trouble. i did type things into the documentation center. one of my errors was trying to interpret the entire string and not break it down. duhhhhhhhhhh. with your help it was quite easy to figure out and i know how to go about finding answers. sorry for the lame question. rich On Wed, Oct 5, 2011 at 5:16 AM, Heike Gramberg <heike.gramberg at gmail.com>wrote: > & is shorthand for Function. It's used in Postfix notation so expr & is the > same as Function[expr]. The parameters of the function are denoted with #1 > (or #), #2, =85 etc. > > /@ is short for Map. Instead of using f /@ {a, b, c} you can also write > Map[f, {a,b,c}] which returns {f[a], f[b], f[c]}. > > %, or Out[], gives the last result generated (which in your case is > probably a list of images). > > So in summary, your example could have been written as > > First[Map[Function[Options[#, "ColorSpace"]], Out[]]] > > Heike. > > On 5 Oct 2011, at 09:59, Richard Cohen wrote: > > > First[Options[#, "ColorSpace"] & /@ %] > > could someone please explain the use of these & /@ % > > i've looked everywhere to no avail. > > rich > > >
- References:
- can't find info about & /@ %
- From: Richard Cohen <cohenrich@gmail.com>
- can't find info about & /@ %