Skip to content

Commit 08fd70c

Browse files
authored
Update README.md
1 parent 503c6b5 commit 08fd70c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

issue14/README.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Swift Weekly - Issue 14 - Generics
1+
# Swift Weekly - Issue 14 - Generics (Part 1)
22

33
```
44
Vandad Nahavandipoor
@@ -224,3 +224,14 @@ Now that we have this operator, we can easily use it to chain `DigitCount` as we
224224
let lengthDigitCount = "Foo Bar" --> StringLength.self --> DigitCount.self
225225
print(lengthDigitCount) //prints 1
226226
```
227+
228+
## Closing Words
229+
I think by now you have an idea how generics work. In generics, you either:
230+
231+
1. Don't constraint your generic types at all, as you saw in the `Stack` example
232+
2. Constraint your generic type to a protocol using the `:` syntax
233+
3. Constraint your generic type to a specific type using the `==` syntax
234+
235+
In later articles we probably can have a look at some more advanced generics-related topics.
236+
237+
HF

0 commit comments

Comments
 (0)