Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2014

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

Search the Archive

Redudant code for style purposes?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132577] Redudant code for style purposes?
  • From: andymhancock at gmail.com
  • Date: Sun, 13 Apr 2014 05:27:37 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net

The Mathematica Cookbook has an example:

   array = RandomReal[{0, 10}, 20]
   Table[List @@ array[[i ;; i + 1]], {i, 1, 16}]

I'm new to Mathematica, but to me, the "List @@" seems redundant.  The
statements give the same results if I remove it.  Is there a reason
for this, either functionally or for clarity?



  • Prev by Date: Re: List vs. array in Mathematica
  • Next by Date: Re: Redudant code for style purposes?
  • Previous by thread: Re: SequenceForm for graphics
  • Next by thread: Re: Redudant code for style purposes?