-
-
Save fitomad/31fd4f8a123e81e1f207b9bb8479db8a to your computer and use it in GitHub Desktop.
This file contains 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
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