Interface QueryFunction<S extends State,​T>