// Generic impl blocks — extend Box with methods import Std::Io::{PrintLine, PrintInt}; struct Box { value: T, } extend Box { func Get(self: *Box) -> T { return self.value; } func Set(self: *Box, value: T) { self.value = value; } } func Main() -> int { let b: Box = Box { value: 42 }; PrintLine("Box value:"); PrintInt(b.Get()); PrintLine(""); b.Set(100); PrintLine("Box after Set(100):"); PrintInt(b.Get()); PrintLine(""); return 0; }