16
netikras
10d

Users.applyAll(u -> u.watchOut(true), u -> u.setCry(false), u -> u.setPout(false));
Users.each(u -> u.tell(He.getName() + " is coming to " + TownRegistry.getCommonName()));

List<Object> list = He.composeList();

He.validate(() -> list);
He.validate(() -> list);

List<Object> naughty = He.filter(He.UserType.NAUGHTY, () -> list);
List<Object> nice = He.filter(He.UserType.NICE, () -> list);

He.with(naughty, nice).arrive(TownRegistry.next());

Users.each(u -> u.setStateObserver(User.State.SLEEPING, He.asObserver()));
Users.each(u -> u.setStateObserver(User.State.AWAKE, He.asObserver()));
He.subscriptions().monitorEvents(s -> s.type == He.EventType.BAD);
He.subscriptions().monitorEvents(s -> s.type == He.EventType.GOOD);
He.subscriptions().each(s -> He.advisor(He.EventType.GOOD).advice(s));

Comments
Add Comment