mention builtin ex coming up

This commit is contained in:
Dave Gauer 2021-04-10 14:45:25 -04:00
parent 88a8f4788d
commit 4251076b50
3 changed files with 10 additions and 2 deletions

View file

@ -25,6 +25,9 @@ pub fn main() void {
//
// See if you can figure out the missing piece:
for (bits) |bit, ???| {
// Note that we convert the usize i to a u32 with
// @intCast(), a builtin function just like @import().
// We'll learn about these properly in a later exercise.
var place_value = std.math.pow(u32, 2, @intCast(u32, i));
value += place_value * bit;
}