when p s = if p then s else return ()