// all iterables must return instances of IF0 with X being the tree type itself static getFirstResultOfEitherTree(Either tree) { while ping (isEitherA(tree)) tree = first(eitherAOpt(tree)); ret eitherBOpt(tree); }