MathGroup Archive 2002

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

Search the Archive

RE: rightTree[tree[_, _, right_]] := right Hu?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38026] RE: [mg37993] rightTree[tree[_, _, right_]] := right Hu?
  • From: "David Park" <djmp at earthlink.net>
  • Date: Tue, 26 Nov 2002 00:49:11 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Steve,

The header "tree" is not a function call but a wrapper for three objects. Is
the following code as much of a mystery?

pick3rdOnListOf3[List[_, _, third_]]:= third

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

From: Steven T. Hatton [mailto:hattons at globalsymmetry.com]
To: mathgroup at smc.vnet.net


I found this:
rightTree[tree[_, _, right_]] := right

in Dr. Mäder's Computer Science with Mathematica.  I understand the spirit
of
the statement, but it looks rather strange to me.  Is there a way of
describing, in a language such as English, exactly what this definition
means? The part that I find confusing is the inclusion of what looks like a
function call in the parameter list.  This simply defies my sense of how
programming languages work.  That doesn't mean it's a bad thing.  It just
means that I don't feel comfortable with the syntax.

Is there somewhere in the Mathematica Book , or Help which discusses such
arcana?

--
STH
Hatton's Law:
"There is only One inviolable Law."




  • Prev by Date: Re: Not getting answer to differential equation DSolve expression
  • Next by Date: Re: Data Conversion
  • Previous by thread: rightTree[tree[_, _, right_]] := right Hu?
  • Next by thread: Re: rightTree[tree[_, _, right_]] := right Hu?