navid/haze / 94d8e2a026845bd62732f6eb7c222b5a9c18a60511c534c648cee6fd4b471090 / samples/baseline_2.9/str_immutable_error.hz

str_immutable_error.hz

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

// Strings are immutable; mutate their bytes instead.

fn main() {
    var text = "hello"
    text[0] = 72
    print(text)
}