Skip to content

Commit 3ec8d58

Browse files
committed
Edit L09
1 parent 1826d76 commit 3ec8d58

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Lessons/09-Functional-ProgrammingPt.1/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,6 @@ Consider a dictionary with book names as key and the amount of each book as the
359359
let bookAmount = ["jumanji": 100.0, "junglebook": 60.00]
360360
```
361361

362-
The closure has arguments of types String and Double that were inferred from the types of the key and value that comprise each element of the dictionary.
363-
364-
365362
Use map to return a string that says how much the books are worth.
366363

367364
```swift
@@ -382,7 +379,7 @@ print(returnFromMap) // [("Harrypotter", 1000.0), ("Junglebook", 600.0)]
382379
```
383380
-->
384381

385-
*source*(https://medium.com/@abhimuralidharan/higher-order-functions-in-swift-filter-map-reduce-flatmap-1837646a63e8)
382+
[source](https://medium.com/@abhimuralidharan/higher-order-functions-in-swift-filter-map-reduce-flatmap-1837646a63e8)
386383

387384
<!-- > -->
388385

Lessons/09-Functional-ProgrammingPt.1/assignments/activity.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ extension City {
6161
We can define several example cities:
6262

6363
```swift
64+
65+
let paris = City(name: "Paris", population: 2241)
66+
let madrid = City(name: "Madrid", population: 3165)
67+
let amsterdam = City(name: "Amsterdam", population: 827)
68+
let berlin = City(name: "Berlin", population: 3562)”
69+
6470
let cities = [paris, madrid, amsterdam, berlin]
6571
```
6672

0 commit comments

Comments
 (0)