# Reuse results from @example blocks

**URL:** <https://discourse.julialang.org/t/reuse-results-from-example-blocks/49908>\
**Category:** New to Julia\
**Tags:** documenter\
**Created:** [November 10, 2020, 12:02pm UTC](https://discourse.julialang.org/t/reuse-results-from-example-blocks/49908 "2020-11-10T12:02:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomhaber](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomhaber](https://discourse.julialang.org/u/tomhaber)\
**Post date:** [November 10, 2020, 12:02pm UTC](https://discourse.julialang.org/t/reuse-results-from-example-blocks/49908/1 "2020-11-10T12:02:00Z")

</div>

I’m writing some documentation using Documenter.jl and would like to create a sort of follow along guide (like a jupyter notebook).

Currently, I’m using @example blocks for showing the code and the results of that computation. As the computations can take quite some time, is there a way to keep the results for the next @example block?

Is there a better way of doing this?

Thanks,  
Tom

---

<div class="post-metadata">

**Author:** ![mortenpi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mortenpi/32/158_2.png) [@mortenpi](https://discourse.julialang.org/u/mortenpi)\
**Post date:** [November 10, 2020, 10:52pm UTC](https://discourse.julialang.org/t/reuse-results-from-example-blocks/49908/2 "2020-11-10T22:52:33Z")

</div>

If you mean sharing variables between at-example blocks within the same build, then yes, you can do that. You can give each block a name (see the [“Named `@example` blocks” section](https://juliadocs.github.io/Documenter.jl/stable/man/syntax/#@example-block)) and then they’ll be share the scope (as long as they are on the same page anyhow).

---

<div class="post-metadata">

**Author:** ![tomhaber](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomhaber](https://discourse.julialang.org/u/tomhaber)\
**Post date:** [November 12, 2020, 9:22am UTC](https://discourse.julialang.org/t/reuse-results-from-example-blocks/49908/3 "2020-11-12T09:22:47Z")

</div>

Thanks, I completely missed that one in the documentation.
