Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #13645 > unrolled thread

(Curious) behavior of Reap

Started byRoger Wilson <rogerhw999@gmail.com>
First post2013-02-28 04:42 +0000
Last post2013-02-28 04:42 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  (Curious) behavior of Reap Roger Wilson <rogerhw999@gmail.com> - 2013-02-28 04:42 +0000

#13645 — (Curious) behavior of Reap

FromRoger Wilson <rogerhw999@gmail.com>
Date2013-02-28 04:42 +0000
Subject(Curious) behavior of Reap
Message-ID<kgmn7k$8gl$1@smc.vnet.net>
If tags are not specified when collecting results using Reap previously pushed into Sow the results are returned in a list of sublists...

Reap[Sow[1, a]; Sow[2, a]; Sow[3, b];]
{Null, {{1, 2}, {3}}}

If tags are specified the results are returned in nested sublists...
Reap[Sow[1, a]; Sow[2, a]; Sow[3, b];, {a, b}]
{Null, {{{1, 2}}, {{3}}}}

I would have expected no difference in the structure of the results returned.

Is this simply a historical inconsistency in Mathematica or is this behavior intended and if so what purpose does it serve?

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web