A domain is a stem when it is neither a leaf nor a root — both upstream domains feed into it and its outlet hands off to a downstream domain.
Examples
g <- sf::read_sf(system.file("extdata/walker.gpkg", package = "hydroloom"))
h <- hy(g) |>
add_toids() |>
add_levelpaths(name_attribute = "GNIS_ID",
weight_attribute = "arbolate_sum")
d <- decompose_network(h)
is_stem_domain(d, names(d$domains)[[1]])
#> [1] FALSE
