The following is a good example of creating your own operators. In the two years since first writing this, I have not found an actual use for this, but it appears to be a common operator in Ruby, and has been implemented several times in Swift.

(‘func isLessOrEqualOrGreater’ just wouldn’t work half as well. Also, please note that at the time I copied this code – which was working – without stumbling over if… if, which is not a good construction.)

This is a good example where obscure symbols make code easier to read; something else to keep in mind.