def owner
import cli@0.2.0.0/cli.bend as Cliimport Base
5914# T1: the deepest ancestor whose args take the long, and its child on path.
5915def owner(path: List<&2, String>, +items: List<&2, Item>, +prefix: String,
5916 +token: String, +long: String, found: Maybe<&2, String>) ->
5917 Maybe<&2, String>:
5918 match path:
5919 case Nil{}: found
5920 case +step <> tail:
5921 owner(tail, sub_items(find_sub(items, step)),
5922 String.concat([prefix, " ", step]), token, long,
5923 owned_by(find_option(items, long), token, prefix, step, found))