Skip to content

Instantly share code, notes, and snippets.

@mikebuss
Created November 4, 2018 00:58
Show Gist options
  • Save mikebuss/d3e6ce86e4a3e826078776621d3fa6d5 to your computer and use it in GitHub Desktop.
Save mikebuss/d3e6ce86e4a3e826078776621d3fa6d5 to your computer and use it in GitHub Desktop.
swift-lazy-init.swift
lazy var players: [String] = {
var temporaryPlayers = [String]()
temporaryPlayers.append("John Doe")
return temporaryPlayers
}()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment