Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #13645 > unrolled thread
| Started by | Roger Wilson <rogerhw999@gmail.com> |
|---|---|
| First post | 2013-02-28 04:42 +0000 |
| Last post | 2013-02-28 04:42 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
(Curious) behavior of Reap Roger Wilson <rogerhw999@gmail.com> - 2013-02-28 04:42 +0000
| From | Roger Wilson <rogerhw999@gmail.com> |
|---|---|
| Date | 2013-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?
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web