Created
September 25, 2024 15:33
-
-
Save rectalogic/24a59b720090a324d14317135ab79d00 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
struct Value(Formattable): | |
var value: Float64 | |
fn __init__(inout self, value: Float64): | |
self.value = value | |
fn format_to(self, inout writer: Formatter): | |
writer.write("Value(", self.value, ")") | |
def main(): | |
v = Value(33) | |
t = Tuple(Reference(v), Reference(Value(99)), Reference(Value(66))) | |
print(t[1][]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment