abstracted over s/r conditions