func (d *DAG) Leaves() []string {
	var result []string
	for id, isLeaf := range d.leaves {
		// isLeaf might be false, explicit mark nodes as non leaves
		if isLeaf {
			result = append(result, id)
		}
	}
	return result
}
func (d *DAG) Leaves() []string {
	var result []string
	for id, isLeaf := range d.leaves {
		
		if isLeaf {
			result = append(result, id)
		}
	}
	return result
}
func ( d * DAG ) Leaves ( ) [ ] string { var result [ ] string for id , isLeaf := range d . leaves { // isLeaf might be false, explicit mark nodes as non leaves if isLeaf { result = append ( result , id ) } } return result }
// Leaves returns a slice containing all leaves in d.
Leaves returns a slice containing all leaves in d .