Skip to content

Commit df2d836

Browse files
sookim-1ochococo
authored andcommitted
Fix Prototype-Pattern SampleCode
I want to modify the prototype pattern sample code. By default, the structure thinks that it does not need to use a prototype pattern because the values are copied. The sample code is structured, so I think it is right to change it to a class.
1 parent 19c7c53 commit df2d836

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ This practise is particularly useful when the construction of a new object is in
10581058
### Example
10591059

10601060
```swift
1061-
struct MoonWorker {
1061+
class MoonWorker {
10621062

10631063
let name: String
10641064
var health: Int = 100

0 commit comments

Comments
 (0)