MathGroup Archive 2003

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

Search the Archive

Re: Usage of "//" Operator

  • To: mathgroup at smc.vnet.net
  • Subject: [mg45261] Re: Usage of "//" Operator
  • From: bobhanlon at aol.com (Bob Hanlon)
  • Date: Wed, 24 Dec 2003 17:42:15 -0500 (EST)
  • References: <bsbmmj$lqc$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Use Slot (#) and Function (&):

expr1 // expr2[x, #, y]&

expr2(x, expr1, y)

tb=Table[0,{i,1,10},{j,1,10}] // MatrixForm // Extract[#, {1}]&


Bob Hanlon

In article <bsbmmj$lqc$1 at smc.vnet.net>, Harold.Noffke at wpafb.af.mil (Harold
Noffke) wrote:

<< The following code will produce the result of "beheading" MatrixForm
from a 10x10 nested List of "0" elements ...

    [1]  tb = Table[0, {i, 1, 10}, {j, 1, 10}] // MatrixForm;
Extract[tb, {1}]

However, if I change [1] to include a second "//" to accomplish the
same thing, I get this ...

    [2]  tb = Table[0, {i, 1, 10}, {j, 1, 10}] // MatrixForm //
Extract[<?>, {1}]

This does not work at all, no matter what I use to replace the "<?>",
which is just my ad-hoc symbol for, "I don't know what to put here."

When I look in the Mathematica index of Operator Input Forms, I find
...

    [3]  expr1 // expr2 == expr2[expr1]

The "==" in [3] is another ad-hoc symbol of mine, which means Operator
Form "is the same as" FullForm.

Now we get to my puzzlement.  If expr2 takes multiple arguments, how
do we denote the results of evaluating expr1, as in my "<?>" in [2]?

Thanks for any help or clarifications on this.  My best guess at the
moment is that Mathematica has no way to do this, which would make
"expr1 // expr2" be NOT fully equivalent to "expr2[expr1]".


  • Prev by Date: Re: how to 'edit' MatrixForm output to create a new matrix?
  • Next by Date: Re: How to copy pattern from one expression to another?
  • Previous by thread: Re: Usage of "//" Operator
  • Next by thread: Re: Usage of "//" Operator