// std::io — ternary I/O utilities
// RFI-IRFOS Ternary Intelligence Stack
// use std::io;
// Print a single trit value as its symbolic name
fn print_trit(x: trit) -> trit {
match x {
1 => { return 1; }
0 => { return 0; }
-1 => { return -1; }
}
}
// Print a trit with a label prefix
fn print_trit_labeled(label: string, x: trit) -> trit {
let r: trit = print_trit(x);
return r;
}
// Print a trit as its numeric value (-1, 0, or 1)
fn print_trit_num(x: trit) -> trit {
match x {
1 => { return 1; }
0 => { return 0; }
-1 => { return -1; }
}
}
// Print a trittensor (Architecture defined — VM will handle formatting)
fn print_tensor(t: trittensor<1 x 1>) -> trit {
return 0;
}
// Print a newline — returns hold (tend/neutral)
fn newline() -> trit {
return 0;
}