Re: Short, simple - Why doesn't it work as a function
- To: mathgroup at smc.vnet.net
- Subject: [mg71783] Re: Short, simple - Why doesn't it work as a function
- From: "wooks" <wookiz at hotmail.com>
- Date: Wed, 29 Nov 2006 02:56:22 -0500 (EST)
- References: <ekh7e4$sd0$1@smc.vnet.net>
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.
>
> I've checked the FullForms and they are different - why??
Tried it after clearing kernel... it works. Sorry folks.