Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import Foundation
extension Int
Y puedes añadirlo en una extensión de tipo
public mutating func callAsFunction(_ sumando: Int) -> Int
self += sumando
return self
var edad = 34
edad(10) // Ahora vale 44
print("Edad \(edad)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.