Use more modern style in examples

inspired by @laszlopandy’s style guide