dubst_bst :: DUTree s -> ST s Tree
dubst_bst t =
    case t of
    DUEmpty ->
        return Empty
    (DUNode lp n rp) ->
        do
        l <- readSTRef lp
        hl <- dubst_bst l
        r <- readSTRef rp
        hr <- dubst_bst r
        return (Node hl n hr)

-- size of high level tree
dubst_bst :: DUTree s -> ST s Tree
dubst_bst t =
    case t of
    DUEmpty ->
        return Empty
    (DUNode lp n rp) ->
        do
        l <- readSTRef lp
        hl <- dubst_bst l
        r <- readSTRef rp
        hr <- dubst_bst r
        return (Node hl n hr)

-- size of high level tree
dubst_bst t =
    case t of
    DUEmpty ->
        return Empty
    (DUNode lp n rp) ->
        do
        l <- readSTRef lp
        hl <- dubst_bst l
        r <- readSTRef rp
        hr <- dubst_bst r
        return (Node hl n hr)

-- size of high level tree