Created
November 4, 2018 01:00
-
-
Save mikebuss/2321ab49c397d1d03f116870906562d3 to your computer and use it in GitHub Desktop.
lazy-var-class-function.swift
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
class TestClass { | |
lazy var players = TestClass.initialPlayers() | |
class func initialPlayers() -> [String] { | |
var players = ["John Doe"] | |
return players | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment