3 ms·
Like dealing with ARC, which is still clunky: @lazy var asHTML: () -> String = { [unowned self] in if let text = self.text { re
by matwood 12y ago
Like dealing with ARC, which is still clunky:
@lazy var asHTML: () -> String = {
[unowned self] in
if let text = self.text {
return "<\(self.name)>\(text)</\(self.name)>"
} else {
return "<\(self.name) />"
}
}
Excerpt From: Apple Inc. “The Swift Programming Language.” iBooks. https://itun.es/us/jEUH0.l https://itun.es/us/jEUH0.l