e0/examples/struct.e0

17 lines
192 B
Plaintext

type IntPair = struct {
fst: int,
snd: int,
}
fn getX() -> IntPair {
return new IntPair {
fst: 4,
snd: 6,
};
}
fn main() -> int {
let x = getX();
return x.fst + x.snd;
}