finishing bitwise operatoins
All checks were successful
Build / build (push) Successful in 1m3s
Test / build (push) Successful in 6m4s

This commit is contained in:
2026-01-20 00:32:50 +01:00
parent 9fb8cbea05
commit 35099b33e1
9 changed files with 260 additions and 62 deletions

View File

@@ -53,11 +53,25 @@ pub const case = struct {
inline else => unreachable,
};
}
pub fn Vec(comptime len: usize, comptime T: type) type {
return struct {
const Self = @This();
val: @Vector(len, T),
pub fn format(self: *const Self, w: *std.Io.Writer) std.Io.Writer.Error!void {
inline for (0..len) |i| {
try w.print("{d}", .{self.val[i]});
if (i < len - 1) try w.writeAll(", ");
}
}
};
}
};
test {
std.testing.refAllDecls(@import("arrays.zig"));
std.testing.refAllDecls(@import("basics.zig"));
std.testing.refAllDecls(@import("bitwise.zig"));
std.testing.refAllDecls(@import("branching.zig"));
std.testing.refAllDecls(@import("casts.zig"));
std.testing.refAllDecls(@import("functions.zig"));