Guest User

Untitled

a guest
Mar 19th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. class Counter<T: Hashable> {
  2. let id: T
  3. private(set) var count: Int = 0
  4. init(id: T) {
  5. self.id = id
  6. }
  7. func increment() {
  8. count += 1
  9. }
  10. }
Add Comment
Please, Sign In to add comment