A number
eval-single-digit

Write a function eval that takes a string and returns a number. For now, just read the first character and convert it to a digit.

A string in Zig has type []const u8 -- a slice of bytes. Characters are numbers: '3' is 51, '0' is 48. So '3' - '0' gives you the integer 3. To get an i64, cast: @as(i64, input[0] - '0').

    print("{d}\n", .{eval("7")});   // 7
fn eval(input: []const u8) i64 {
    return @as(i64, input[0] - '0');
}

One character. One digit. It's absurd. But it runs, and it's correct. We'll grow it.