Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
final class OnceToken {
private(set) lazy var perform: () -> Void = {
self.closure()
return {}
}()
private let closure: () -> Void
init(execute closure: @escaping () -> Void) {
self.closure = closure
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment