My preference would be to mention the transform operation first and updateStateByKey second. The reason is that the transform operation is and it's also very fundamental (in that other operators can all be built on it) so it feels natural to lead with it.