To be able to edit code and run cells, you need to run the notebook yourself. Where would you like to run the notebook?

This notebook takes about 50 seconds to run.

In the cloud (experimental)

Binder is a free, open source service that runs scientific notebooks in the cloud! It will take a while, usually 2-7 minutes to get a session.

On your computer

(Recommended if you want to store your changes.)

  1. Copy the notebook URL:
  2. Run Pluto

    (Also see: How to install Julia and Pluto)

  3. Paste URL in the Open box

Frontmatter

If you are publishing this notebook on the web, you can set the parameters below to provide HTML metadata. This is useful for search engines and social media.

Author 1
👀 Reading hidden code
using Pluto
❔
┌ Info: 
│ 
│     Welcome to Pluto v0.14.8 🎈
│     Start a notebook server using:
│ 
│   julia> Pluto.run()
│ 
│     Have a look at the FAQ:
│     https://github.com/fonsp/Pluto.jl/wiki
└ 
4.3 s
👀 Reading hidden code
codes = [
:(z = x + y)
:(f(x::T) = 1)
:(struct T
a
b
end)
:(y = x)
:(x = 324)
]
9.8 ms
👀 Reading hidden code
ordered_codes = codes[permutation]
15.5 μs
👀 Reading hidden code
ids = [uuid1() for _ in codes]
27.2 μs
👀 Reading hidden code
using UUIDs
129 μs
nb = Pluto.Notebook([
Pluto.Cell(;
code=string(c),
cell_id=i,
)
for (c,i) in zip(codes, ids)
])
👀 Reading hidden code
337 ms
order = begin
nb.topology = Pluto.updated_topology(nb.topology, nb, nb.cells)
Pluto.topological_order(nb)
end
👀 Reading hidden code
4.1 s
ordered_ids = [c.cell_id for c in collect(order)]
👀 Reading hidden code
27.9 ms
permutation = [ findfirst(isequal(i), ids) for i in ordered_ids]
👀 Reading hidden code
28.1 μs

👀 Reading hidden code
73.3 μs