Abstract over state and action type. NIIIICE!