/** * Provides a show instance that draws a 2-dimensional representation of a tree. * * @param s A show instance for the elements of the tree. * @return a show instance that draws a 2-dimensional representation of a tree. */ public static <A> Show<Tree<A>> show2D(final Show<A> s) { return Show.showS(tree -> tree.draw(s)); }
private Stream<String> drawTree(final Show<A> s) { return drawSubTrees(s, subForest._1()).cons(s.showS(root)); }