Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public struct Potencias
{
/// Elevar a 2
@Power(2) public var numero = 10
...
}
//
// Prueba
//
var potencias = Potencias()
print("10 elevado a 2 es \(potencias.numero)")
// el resultado es: 10 elevado a 2 es 100
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.