navid/haze / ea08ceb46539df9cf3ac396bc0bd66fc4f6b9adc630e1596e79b8e4d3101673a / samples/baseline_2.1/pre_success.hz

pre_success.hz

← samples/baseline_2.1 · 125 bytes · raw · download

pure fn even(n i32) bool => n % 2 == 0

fn half(n i32) i32
    : pre even(n)
    => n / 2

fn main() {
    print(half(10))
}