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

**URL:** <https://forums.kodeco.com/t/advanced-swift-3-part-3-custom-operators-ray-wenderlich/29456>\
**Category:** 🎓 Courses & Articles\
**Created:** [May 9, 2017, 3:37pm UTC](https://forums.kodeco.com/t/advanced-swift-3-part-3-custom-operators-ray-wenderlich/29456 "2017-05-09T15:37:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rayfix](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rayfix/32/108995_2.png) [@rayfix](https://forums.kodeco.com/u/rayfix)\
**Post date:** [May 9, 2017, 3:37pm UTC](https://forums.kodeco.com/t/advanced-swift-3-part-3-custom-operators-ray-wenderlich/29456/1 "2017-05-09T15:37:39Z")

</div>

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](https://www.raywenderlich.com/3810-advanced-swift-3/lessons/3)

---

<div class="post-metadata">

**Author:** ![rcritz](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rcritz/32/111201_2.png) [@rcritz](https://forums.kodeco.com/u/rcritz)\
**Post date:** [May 17, 2017, 10:51pm UTC](https://forums.kodeco.com/t/advanced-swift-3-part-3-custom-operators-ray-wenderlich/29456/2 "2017-05-17T22:51:44Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![rayfix](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rayfix/32/108995_2.png) [@rayfix](https://forums.kodeco.com/u/rayfix)\
**Post date:** [May 17, 2017, 11:25pm UTC](https://forums.kodeco.com/t/advanced-swift-3-part-3-custom-operators-ray-wenderlich/29456/3 "2017-05-17T23:25:26Z")

</div>

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