This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| class Box<T> { | |
| typealias Observer = (T) -> Void | |
| var observer: Observer? | |
| func bind(observer: Observer?) { | |
| self.observer = observer | |
| } | |
| var value: T { | |
| didSet { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // main.swift | |
| // LRUCache | |
| // | |
| // Created by Paul Wood on 9/19/19. | |
| // Copyright © 2019 Paul Wood. All rights reserved. | |
| // | |
| import Foundation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // ImageDownloaderCommonBlocks.h | |
| // AsyncImageDownloader | |
| // | |
| // Created by Paul Wood on 9/23/19. | |
| // Copyright © 2019 Paul Wood. All rights reserved. | |
| // | |
| #ifndef ImageDownloaderCommonBlocks_h | |
| #define ImageDownloaderCommonBlocks_h |
OlderNewer