Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.