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


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

(Curious) behavior of Reap

From Roger Wilson <rogerhw999@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject (Curious) behavior of Reap
Date 2013-02-28 04:42 +0000
Message-ID <kgmn7k$8gl$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


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 comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web