Advanced Swift 3 - Part 3: Custom Operators | Ray Wenderlich

Swift gives you the ability to create your own operators with custom precedence. This video shows you how to tap into this power.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/3810-advanced-swift-3/lessons/3

Great job, Ray!

I wonder if, perhaps, the challenge should rightly used ClosedRange instead of Range in its solution? Otherwise (using your example) aboutThree.contains(3.5) is false.

Great observation! I agree. ClosedRange gives better symmetry if you have to choose one.