MathGroup Archive 1994

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

Search the Archive

Unexpected RepeatNull behaviour. BUG?

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Unexpected RepeatNull behaviour. BUG?
  • From: Peter Whaite <peta at donner.mcrcim.mcgill.edu>
  • Date: Fri, 25 Feb 1994 17:12:12 -0500

In...	Mathematica 2.2 for SGI
	Copyright 1988-93 Wolfram Research, Inc.
	 -- Motif graphics initialized -- 

If I define...

	In[253]:= Clear[foo]; foo[l:_Integer...] := {l};

then it works as expected...

	In[254]:= foo[1,2,3]
	Out[254]= {1, 2, 3}

	In[255]:= foo[1]
	Out[255]= {1}

except for...

	In[256]:= foo[]
	Out[256]= foo[]

Maybe I'm missing something obvious, but why does

	In[257]:= Clear[foo]; foo[l:(_Integer|AnyThing)...] := {l};

	In[258]:= foo[1]
	Out[258]= {1}

	In[259]:= foo[]
	Out[259]= {}

work!!?  Please enlighten.





  • Prev by Date: Mistroke
  • Next by Date: Mathematica help
  • Previous by thread: Mistroke
  • Next by thread: Mathematica help