public static TreeForest <B> Apply <A, B>(this TreeForest <Func <A, B> > f, TreeForest <A> o) { return(f.SelectMany(g => o.Select(p => g(p)))); }
public static TreeForest <A> Flatten <A>(this TreeForest <TreeForest <A> > o) { return(o.SelectMany(z => z)); }
public static TreeForest <A> Flatten <A>(this TreeForest <TreeForest <A> > o) => o.SelectMany(z => z);