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 2001

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

Search the Archive

Re: List-Operations on Heads other than List

  • To: mathgroup at
  • Subject: [mg29757] Re: List-Operations on Heads other than List
  • From: "Allan Hayes" <hay at>
  • Date: Sat, 7 Jul 2001 02:26:02 -0400 (EDT)
  • References: <9i068k$h0i$> <9i3pf2$lsh$>
  • Sender: owner-wri-mathgroup at

"Orestis Vantzos" <atelesforos at> wrote in message
news:9i3pf2$lsh$1 at
> do keep in mind though, that Select searches in all the levels of your
> expression and you might get weird results because of this.


Select only selects from level one, ignoring heads.
You may be thinking of  Cases:

Select[h[a,b[c],d, e], MatchQ[#,_Symbol]&, 2]


Cases[h[a,b[c],d, e], _Symbol,{1, 2}, 4,Heads\[Rule]True]


Note that Select uses the head h as a wrapper while Cases uses List.

Allan Hayes
Mathematica Training and Consulting
Leicester UK
hay at
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

  • Prev by Date: Re: freebsd and mathematica
  • Next by Date: Partitioning 1-D list into 2-D Matrix
  • Previous by thread: Re: List-Operations on Heads other than List
  • Next by thread: Should Pure Functions Require &