Rose Trees, ported from Haskell
Graph algorithms, ported from Haskell
shadow update