Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Improper use of slot

  • To: mathgroup at
  • Subject: [mg58762] Re: [mg58754] Improper use of slot
  • From: yehuda ben-shimol <bsyehuda at>
  • Date: Sun, 17 Jul 2005 13:03:08 -0400 (EDT)
  • References: <>
  • Reply-to: yehuda ben-shimol <bsyehuda at>
  • Sender: owner-wri-mathgroup at

Hi bob,
From your description I figure out that lst is a flat list (only one
pair of curly braces arround a list of integers).
In this case
Binomial[ Last[#], First[#]] & /@ lst
Last anf First will be applied in turn to EACH element of lst and you
will alwys get 1 as an answer, that is, mapping this oven list will
return you a list of 1's with length equal to the length of lst.
The correct format that you need for this case is 
Binomial[ Last[#], First[#]] & [lst]
for example check with
Binomial[ Last[#], First[#]] & /@ lst//Trace
Binomial[ Last[#], First[#]] & [lst]//Trace

On 7/17/05, Robert G. Wilson v <rgwv at> wrote:
> Help, I am trying to 'pipe' into Binomial[] two arguments which are taken from
> a list, say lst. I could do something like:
> ... lst= ...; Binomial[ Max[lst], Min[lst]]
> but I was hoping for something a little bit more elegant like:
> Binomial[ Last[#], First[#]] & /@ lst
> but that dog wont hurt. Any suggestions?
> Thank you in advance.
> Bob Wilson.

  • Prev by Date: Re: Improper use of slot
  • Next by Date: Re: Eliminating Annoying Minus Signs
  • Previous by thread: Improper use of slot
  • Next by thread: Re: Improper use of slot