Skip to content

Instantly share code, notes, and snippets.

@eldesperado
Created November 9, 2015 03:50
Show Gist options
  • Save eldesperado/ca56012b35bf23f0955a to your computer and use it in GitHub Desktop.
Save eldesperado/ca56012b35bf23f0955a to your computer and use it in GitHub Desktop.
Conforming types can be initialized with array literals.
<# type #> <# extendedType #> : ArrayLiteralConvertible {
required init(arrayLiteral elements: <# elementType #>...) {
self.<# storage #> = elements
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment