Skip to content

Commit 0a3c6d9

Browse files
authored
Update README
1 parent 14c5590 commit 0a3c6d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Handful of functions that will help you work with `Optional` types. 100% inspire
1212
### expect(_ desrcription: String) -> Wrapped
1313
Unwraps an `Optional`, yielding the content of a .some. Or throws `fatalError` with given description
1414
```swift
15-
let x: String? = nil
16-
x.expect("the world is ending")
15+
let x: String? = nil
16+
x.expect("the world is ending")
1717
```
1818

1919
### unwrapOr(_ def: Wrapped) -> Wrapped
@@ -55,7 +55,7 @@ let r = x.mapOr(42) { (v: String) -> Int in
5555

5656
### mapOrElse\<T>\(_ def: () -> T, _ f: (Wrapped) -> T) -> T {
5757
Applies a function to the contained value (if any), or computes a default (if not).
58-
```switf
58+
```swift
5959
let x: String? = nil
6060
let r = x.mapOrElse({
6161
3 * 3

0 commit comments

Comments
 (0)