/** * A show instance for the {@link P2 tuple-2} type. * * @param sa Show for the first element of the tuple. * @param sb Show for the second element of the tuple. * @return A show instance for the {@link P2 tuple-2} type. */ public static <A, B> Show<P2<A, B>> p2Show(final Show<A> sa, final Show<B> sb) { return p2Show(sa, sb, "(", ",", ")"); }
/** * A show instance for the {@link P2 tuple-2} type in the style of a mapping from A to B. * * @param sa Show for the first element of the tuple. * @param sb Show for the second element of the tuple. * @return A show instance for the {@link P2 tuple-2} type. */ public static <A, B> Show<P2<A, B>> p2MapShow(final Show<A> sa, final Show<B> sb) { return p2Show(sa, sb, "(", ": ", ")"); }
@Override public final String toString() { return Show.p2Show(Show.<A>anyShow(), Show.<B>anyShow()).showS(this); }
public static <K, V> Show<fj.data.hamt.Node<K, V>> hamtNodeShow(Show<K> sk, Show<V> sv) { F<fj.data.hamt.Node<K, V>, String> f = n -> n.match(p -> p2Show(sk, sv).showS(p), h -> hamtShow(sk, sv).showS(h)); return Show.showS(f); }