The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: (Curious) behavior of Reap
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Roger Wilson

Posts: 16
Registered: 10/23/10
(Curious) behavior of Reap
Posted: Feb 27, 2013 11:42 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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?

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.