MathGroup Archive 2012

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

Search the Archive

Re: Understanding patterns


> I can't quite make sense of the following:
> 
> f[p : {__?NumericQ}] :=

The other replies have already described what the pattern does. I thought it might just be useful to point out that you can also examine the FullForm structure: 
In[]:= FullForm[p:{__?NumericQ}]
Out[]= Pattern[p, List[PatternTest[BlankSequence[], NumericQ]]] 

Sometimes when constructing complicated patterns with defaults etc, I find it useful to look at the FullForm...



  • Prev by Date: Re: Error function integral / Wolfram Function reference
  • Next by Date: Turning Autorun Off
  • Previous by thread: Re: Understanding patterns
  • Next by thread: How to use Jlink to access Mathematica Boolean Functions