Search for all pages containing Reap
Reap
✖
Reap
Details

- Sow and Reap provide a convenient way to accumulate a list of intermediate results in a computation.
- Reap accumulates expressions in the order in which Sow is applied to them.
- Expressions sown with a particular tag are collected by the innermost Reap whose pattern matches the tag.
- Reap[expr] is equivalent to Reap[expr,_].
- Reap has attribute HoldFirst.
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Scope (2)Survey of the scope of standard use cases
Generalizations & Extensions (1)Generalized and extended use cases
Applications (2)Sample problems that can be solved with this function
Find the list of values sampled by Plot:

https://wolfram.com/xid/0giugq-o2r

Remove duplicates from a list, keeping original order:

https://wolfram.com/xid/0giugq-locq40

https://wolfram.com/xid/0giugq-dglzol

This is like Union without the sorting:

https://wolfram.com/xid/0giugq-b5gtw

Properties & Relations (3)Properties of the function, and connections to other functions
If no expressions are sown, Reap returns an empty list of expressions it has reaped:

https://wolfram.com/xid/0giugq-gy4

Reap collects expressions in exactly the order they are sown:

https://wolfram.com/xid/0giugq-dv1

The list associated with the first tag to be encountered is given first:

https://wolfram.com/xid/0giugq-otg


https://wolfram.com/xid/0giugq-gp1

Wolfram Research (2003), Reap, Wolfram Language function, https://reference.wolfram.com/language/ref/Reap.html.
Text
Wolfram Research (2003), Reap, Wolfram Language function, https://reference.wolfram.com/language/ref/Reap.html.
Wolfram Research (2003), Reap, Wolfram Language function, https://reference.wolfram.com/language/ref/Reap.html.
CMS
Wolfram Language. 2003. "Reap." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Reap.html.
Wolfram Language. 2003. "Reap." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Reap.html.
APA
Wolfram Language. (2003). Reap. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Reap.html
Wolfram Language. (2003). Reap. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Reap.html
BibTeX
@misc{reference.wolfram_2025_reap, author="Wolfram Research", title="{Reap}", year="2003", howpublished="\url{https://reference.wolfram.com/language/ref/Reap.html}", note=[Accessed: 31-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_reap, organization={Wolfram Research}, title={Reap}, year={2003}, url={https://reference.wolfram.com/language/ref/Reap.html}, note=[Accessed: 31-March-2025
]}