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: [mg58774] Re: Improper use of slot
  • From: Peter Pein <petsie at>
  • Date: Sun, 17 Jul 2005 13:03:21 -0400 (EDT)
  • References: <dbd0vm$2s4$>
  • Sender: owner-wri-mathgroup at

Robert G. Wilson v schrieb:
> 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.

Hi Bob,

use the function application (f[lst] or f@lst) instead of mapping (f/@lst)!

In[1]:= Binomial[Max[#], Min[#]]&@{2, 4, 3, 5}
Out[1]= 10

    Binomial[Max[#], Min[#]]& /@ {{2, 4, 3, 5}, {k, n}},
  n > k]
Out[2]= {10, Binomial[n, k]}


P.S. sorry, if this message arrives twice; I've got a temporary problem
with my mail/news client.
Peter Pein

  • Prev by Date: Re: How to create a new Form
  • Next by Date: Re: Improper use of slot
  • Previous by thread: Re: Improper use of slot
  • Next by thread: Re: Improper use of slot