Re: Short, simple - Why doesn't it work as a function

*To*: mathgroup at smc.vnet.net*Subject*: [mg71787] Re: Short, simple - Why doesn't it work as a function*From*: Bill Rowe <readnewsciv at sbcglobal.net>*Date*: Wed, 29 Nov 2006 02:56:29 -0500 (EST)

On 11/28/06 at 6:04 AM, wookiz at hotmail.com (wooks) wrote: >{#, a} & /@ {a, b, c} >gives {{a, a}, {b, a}, {c, a}} which is what i want. >why[x_List] := {#, a} & /@ x; why[{a, b, c}] >gives. >{{a, a}, {{b, a}, {{c, a}, {}}}} >not what I want. That isn't what I get in a fresh session, i.e. In[1]:= why[x_]:={#,a}&/@x In[2]:= why[{a,b,c}] Out[2]= {{a, a}, {b, a}, {c, a}} In[3]:= $Version Out[3]= 5.2 for Mac OS X (June 20, 2005) -- To reply via email subtract one hundred and four