MathGroup Archive 1992

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

Search the Archive

Re: elegance vs. 'quick and dirty': a Mathematica expression beauty contest

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Re: elegance vs. 'quick and dirty': a Mathematica expression beauty contest
  • From: John Lee <lee at math.washington.edu>
  • Date: Fri, 3 Apr 92 11:38:47 -0800

Here's a solution to the Flattening problem that I posted a while ago to
sci.math.symbolic, but didn't get around to sending to this group.  It's
actually a slight variation on gaylord's solution #1, but it looks a little
cleaner.  In some simple timing tests, #2 was fastest (3.4 seconds for 1000
iterations on a DECStation 5000), my solution and #1 took about the same
amount of time (5.5 seconds), while #3 took about 8.6 seconds.  

  finallist = startlist //. {a___,{b__List},c___} :> {a,b,c}

Jack Lee
Dept. of Mathematics
University of Washington





  • Prev by Date: Re: using graphics on X11 remotely
  • Next by Date: elegance vs. 'quick and dirty'
  • Previous by thread: elegance vs. 'quick and dirty': a Mathematica expression beauty contest
  • Next by thread: elegance vs. 'quick and dirty'