# Equatable

## Overview

## Sample Codes

{% code title="Example 1" %}

```swift
func getRandomNumber() -> some Equatable {  // It will be Equitable but some specific kind of
    Double.random(in: 1...6)  // Here it says the Equatable is Integer, thus it gives us the ability to change our mind later
}

func getRandomBool() -> some Equatable {
    Bool.random()
}

print(getRandomNumber() == getRandomNumber())

// print: false
```

{% endcode %}

## Sources

### Videos

### Articles / Documents

* [Developer.Apple.com / Equatable](https://developer.apple.com/documentation/swift/equatable)
* [Hacking with Swift / 100 days / 13 - How to use opaque return types](https://www.hackingwithswift.com/quick-start/beginners/how-to-use-opaque-return-types)
