static void onNotify(String key, Function f) { if (subs[key] == null) subs[key] = []; subs[key].add(f); }