code: func sortDependenciesR(root Root, seen map[string]bool, sorted *[]Root, depFunc func(Root) []Root) {
  	for _, dep := range depFunc(root) {
  		if !seen[dep.DSLName()] {
  			seen[root.DSLName()] = true
  			sortDependenciesR(dep, seen, sorted, depFunc)
  		}
  	}
  	*sorted = append(*sorted, root)
  }
docs: // sortDependenciesR sorts the depencies of the given root in the given slice.