# How to hand-craft an edge into a Pluto's a computational graph?

**URL:** https://discourse.julialang.org/t/how-to-hand-craft-an-edge-into-a-plutos-a-computational-graph/108619
**Category:** Specific Domains
**Tags:** question, pluto
**Created:** [January 10, 2024, 12:52pm UTC](https://discourse.julialang.org/t/how-to-hand-craft-an-edge-into-a-plutos-a-computational-graph/108619 "2024-01-10T12:52:26Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![contradict](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@contradict](https://discourse.julialang.org/u/contradict)
#### Post date: [January 10, 2024, 3:44pm UTC](https://discourse.julialang.org/t/how-to-hand-craft-an-edge-into-a-plutos-a-computational-graph/108619/4 "2024-01-10T15:44:40Z")

</div>

I think Pluto’s graph follows assignments, not necessarily modifications.

```julia
### A Pluto.jl notebook ###
# v0.19.36

using Markdown
using InteractiveUtils

# ╔═╡ 371228e6-afce-11ee-0e08-ffcab94f43bb
x = collect(1:10)

# ╔═╡ a0c5e59e-102b-4d04-a568-b19456a6d79a
n = 5

# ╔═╡ f59fac3f-6c9c-4b4e-87f6-44a80f036af0
y = if isodd(n)
    x[1:2:n] .= 42
    x
end

# ╔═╡ e75712ff-f50d-4f00-be5b-77408a49ece3
sum(y)

# ╔═╡ Cell order:
# ╠═371228e6-afce-11ee-0e08-ffcab94f43bb
# ╠═a0c5e59e-102b-4d04-a568-b19456a6d79a
# ╠═f59fac3f-6c9c-4b4e-87f6-44a80f036af0
# ╠═e75712ff-f50d-4f00-be5b-77408a49ece3

```

I don’t see how to add an assignment that catches reducing `n` yet.

Edit. ugh:

```julia
y = if isodd(n)
	y = copy(x)
	y[1:2:n] .= 42
	y
end

```

---

_[View the full topic](https://discourse.julialang.org/t/how-to-hand-craft-an-edge-into-a-plutos-a-computational-graph/108619)._
