MathGroup Archive 1990

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

Search the Archive

Flat esoterica

  • To: mathgroup at yoda.ncsa.uiuc.edu
  • Subject: Flat esoterica
  • From: macg at SLCS.SLB.COM (Bill Macgregor)
  • Date: Wed, 10 Oct 90 14:44:39 CDT

Two examples below of apparently inconsistent behavior wrt. the Flat
attribute.  Can anyone explain it?

  - Bill MacGregor

------------------

In[1]:= SetAttributes[f, Flat]

In[2]:= f[x_] := x

In[3]:= On[]

In[4]:= f[1]

f::trace: f[1] --> f[1].

f::trace: f[1] --> f[1].

f::trace: f[1] --> f[1].

f::trace: f[1] --> f[1].

f::trace: f[1] --> f[1].

f::trace: f[1] --> f[1].

f::trace: f[1] --> f[1].

^C

Interrupt:
        continue (or c) to continue
        show (or s) to show current operation (and then continue)
        trace (or t) to show all operations
        abort (or a) to abort current calculation
        exit (or quit) to exit program
? abort
-interrupted-

Out[4]= $Interrupted

In[5]:= Clear[f]

Clear::trace: Clear[f] --> Null.

In[6]:= f[x__] := Identity[x]

SetDelayed::trace: f[x__] := Identity[x] --> Null.

In[7]:= f[1]

f::trace: f[1] --> Identity[1].

Identity::trace: Identity[1] --> 1.

Out[7]= 1

 



  • Prev by Date: On the Function problem
  • Next by Date: Parameter passing "feature"
  • Previous by thread: On the Function problem
  • Next by thread: Parameter passing "feature"