MathGroup Archive 2005

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

Search the Archive

Re: hunting down problems with my code


>-----Original Message-----
>From: Chris Chiasson [mailto:chris.chiasson at gmail.com] 
To: mathgroup at smc.vnet.net
>Sent: Saturday, March 05, 2005 7:35 AM
>Subject: [mg54947] [mg54895] hunting down problems with my code
>
>came down to this today:
>
>#_?NumberQ//FullForm
>
>Times[PatternTest[Blank[],NumberQ],Slot[1]]
>
>f_?NumberQ//FullForm
>
>PatternTest[Pattern[f,Blank[]],NumberQ]
>
>It's only amusing after the fact.
>-- 
>Chris Chiasson
>Kettering University
>Mechanical Engineering
>Graduate Student
>1 810 265 3161
>
>

Chris,

what makes you surprised?

In[1]:= f[1]_?NumberQ // FullForm
Out[1]//FullForm=
Times[f[1], PatternTest[Blank[], NumberQ]]


# is just syntactical sugar for Slot[1] (a read macro, so to speak).

--
Hartmut Wolf


  • Prev by Date: Re: Recursion
  • Next by Date: Re: Re: Re: Why does mathematica randomly rewrite notebooks?
  • Previous by thread: hunting down problems with my code
  • Next by thread: Re: hunting down problems with my code