A Recipe for State-and-Effect Triangles (Logical Methods in Computer Science, 2017)