copy(t::Tree) was creating a new empty data structure for each node. I have no idea why I wrote it like this. This caused a bug in Pluto, which apparently sometimes calls convert on variables between cells, which would reset the data in Tree objects.
Anyway: copy now
calls deepcopy on node data
still creates a completely independent Tree object
copy(t::Tree)
was creating a new empty data structure for each node. I have no idea why I wrote it like this. This caused a bug in Pluto, which apparently sometimes callsconvert
on variables between cells, which would reset the data inTree
objects. Anyway: copy nowdeepcopy
on node dataTree
object