def owned_result
import bend-collections@1.0.0.0/src/containers/dynamic_array.bend as DynamicArrayimport Base
import bend-collections@1.0.0.0/src/containers/types/dynamic_array.bend as E
540def owned_result(~T: Type, slot: Maybe<&1, T>) -> Result<&2, &1, E.Error, T>:
541 match slot:
542 case None{}:
543 Fail{E.IndexOutOfRange{}}
544 case Some{x}:
545 Done{x}