# ``Swift/Optional``

## Topics

### Creating an Optional Value

- ``Swift/Optional/some(_:)``
- ``Swift/Optional/init(_:)-46x3s``
- ``Swift/Optional/init(_:)-1j774``

### Creating a Nil Value

- ``Swift/Optional/none``
- ``Swift/Optional/init(nilLiteral:)``

### Transforming an Optional Value

- ``Swift/Optional/map(_:)``
- ``Swift/Optional/flatMap(_:)``

### Coalescing Nil Values

- ``Swift/??(_:_:)-9xjze``
- ``Swift/??(_:_:)-1fjjj``

### Comparing Optional Values

- ``Swift/Optional/==(_:_:)-(Wrapped?,Wrapped?)``
- ``Swift/Optional/==(_:_:)-(_OptionalNilComparisonType,_)``
- ``Swift/Optional/==(_:_:)-(_,_OptionalNilComparisonType)``
- ``Swift/Optional/!=(_:_:)-(Self,_)``
- ``Swift/Optional/!=(_:_:)-(_,Wrapped?)``
- ``Swift/Optional/!=(_:_:)-(Wrapped?,_)``
- ``Swift/Optional/~=(_:_:)``

### Encoding and Decoding

- ``Swift/Optional/encode(to:)``
- ``Swift/Optional/init(from:)``

### Inspecting an Optional

- ``Swift/Optional/hash(into:)``
- ``Swift/Optional/unsafelyUnwrapped``
- ``Swift/Optional/debugDescription``
- ``Swift/Optional/customMirror``

