Skip to content

Commit bf65227

Browse files
committed
make abstract trees more generic
1 parent 5813d29 commit bf65227

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Trees/abstracttree.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ end
2828
2929
Return `true` if `t` is its own parent.
3030
"""
31-
function isroot(t::AbstractTree)
31+
function isroot(t)
3232
parent(t) == t
3333
end
3434

@@ -49,7 +49,7 @@ Recursive function to compute the depth of `node` in a a tree-like structure.
4949
Overload this function if your structure has a more efficient way to compute
5050
`depth` (e.g. if it stores it in a field).
5151
"""
52-
function depth(tree::AbstractTree,acc=0)
52+
function depth(tree,acc=0)
5353
if isroot(tree)
5454
return acc
5555
else

0 commit comments

Comments
 (0)