--- /dev/null
+package edu.berkeley.sbp.misc;
+import edu.berkeley.sbp.*;
+import edu.berkeley.sbp.util.*;
+
+public class CharTopology extends IntegerTopology<Character> implements Functor<Character,Integer> {
+ public Integer invoke(Character c) { return (int)c.charValue(); }
+ public CharTopology() { super(null); }
+ public CharTopology(Range.Set r) { super(null, r); }
+ public CharTopology(char a, char b) { super(null, a, b); }
+}
--- /dev/null
+package edu.berkeley.sbp.util;
+public class ANSI {
+ public static String black(Object o) { return "\033[30m"+o+"\033[0m"; }
+ public static String red(Object o) { return "\033[31m"+o+"\033[0m"; }
+ public static String green(Object o) { return "\033[32m"+o+"\033[0m"; }
+ public static String yellow(Object o) { return "\033[33m"+o+"\033[0m"; }
+ public static String blue(Object o) { return "\033[34m"+o+"\033[0m"; }
+ public static String purple(Object o) { return "\033[35m"+o+"\033[0m"; }
+ public static String cyan(Object o) { return "\033[36m"+o+"\033[0m"; }
+}
--- /dev/null
+package edu.berkeley.sbp.util;
+
+public interface Functor<A,B> {
+ public B invoke(A a);
+}