Skip to content

Instantly share code, notes, and snippets.

@lexrus
Created September 5, 2022 15:33
Show Gist options
  • Save lexrus/f68c5d44c53c090f9687ba1b2ddc149b to your computer and use it in GitHub Desktop.
Save lexrus/f68c5d44c53c090f9687ba1b2ddc149b to your computer and use it in GitHub Desktop.
self.swift
import Foundation
class `Self` {
/// 我是谁,我从哪里来,我要到哪去
lazy var `self`: Self? = { [weak self] in
guard let self = self else { return { [weak self] in { [weak self] in { [weak self] in { [weak self] in { [weak self] in self }() }() }() }() }() }
guard let self = { [weak self] in self }() else { return { [weak self] in { [weak self] in { [weak self] in { [weak self] in self }() }() }() }() }
guard let self = { [weak self] in { [weak self] in self }() }() else { return { [weak self] in { [weak self] in { [weak self] in self }() }() }() }
guard let self = { [weak self] in { [weak self] in { [weak self] in self }() }() }() else { return { [weak self] in { [weak self] in self }() }() }
guard let self = { [weak self] in { [weak self] in { [weak self] in { [weak self] in self }() }() }() }() else { return { [weak self] in self }() }
guard let self = { [weak self] in { [weak self] in { [weak self] in { [weak self] in { [weak self] in self }() }() }() }() }() else { return self }
return { [weak self] in { [weak self] in { [weak self] in { [weak self] in { [weak self] in { [weak self] in self }() }() }() }() }() }()
}()
}
print(`Self`().`self`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment