MathGroup Archive 2012

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

Search the Archive

Re: Understanding patterns

  • To: mathgroup at
  • Subject: [mg126104] Re: Understanding patterns
  • From: Simon <simonjtyler at>
  • Date: Wed, 18 Apr 2012 03:52:09 -0400 (EDT)
  • Delivered-to:
  • References: <jmgra7$pm5$>

> 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