Re: rightTree[tree[_, _, right_]] := right Hu?
- To: mathgroup at smc.vnet.net
- Subject: [mg38021] Re: [mg37993] rightTree[tree[_, _, right_]] := right Hu?
- From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
- Date: Tue, 26 Nov 2002 00:48:50 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Not a function call but a pattern with Head "tree". Actually pretty basic Mathematica programming. Look up the Mathematica book under Head etc. Oh, by the way, one more thing. Knowing too much about other programming languages is actually a bit of a handicap as far as Mathematica is concerned, unless they are Lisp and Prolog (and even then you have to be pretty careful for things tend to be not quite what they seem...) Andrzej Kozlowski Yokohama, Japan http://www.mimuw.edu.pl/~akoz/ http://platon.c.u-tokyo.ac.jp/andrzej/ On Monday, November 25, 2002, at 03:56 PM, Steven T. Hatton wrote: > 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." > > > >