I am trying to use Sow/Reap in Mathematica to replace Append in my code. The problem is that I need to define the tags within my code, but doing so doesn't reap the desired results. A simplified version of my code is(adsbygoogle = window.adsbygoogle || []).push({});

However, if I define my tag outside of Reap, then it worksCode (Text):

Clear[tag];

Reap[tag = {a,b}; Sow[1, a];Sow[2,b];, tag]

Any ideas as to how I can define tags within my code?Code (Text):

Clear[tag];

tag = {a,b};

Reap[Sow[1, a];Sow[2,b];, tag]

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Mathematica: tags in Reap/Sow

Loading...

Similar Threads - Mathematica tags Reap | Date |
---|---|

Simple mathematica question | Feb 2, 2017 |

What is the C/++/# tag? | Feb 13, 2016 |

Mathematica: Animate multiple sets of XY data | Oct 11, 2015 |

How did you learn to program? (C++, Mathematica, etc)? | Aug 25, 2015 |

How much faster is Python than Mathematica? | May 30, 2015 |

**Physics Forums - The Fusion of Science and Community**