Added first structure: both needed types and init function header

main
2wenty1ne 2024-11-06 15:44:28 +01:00
parent d3fe45cca7
commit 81887e01ed
2 changed files with 35 additions and 5 deletions

35
LList.zig 100644
View File

@ -0,0 +1,35 @@
const std = @import("std");
pub fn LLIst (comptime T: type) type {
return struct {
const Self = @This();
const _: T = undefined;
pub fn init() void {
}
pub fn deinit() void {
}
};
}
pub fn Node () type {
return struct {
comptime T: type = undefined,
const Self = @This();
const next: *Self = undefined;
//var value: T = undefined;
pub fn init(this: *Self, comptime T: type) void {
this.T = T;
}
};
}
pub fn main() !void {
}

View File

@ -1,5 +0,0 @@
const std = @import("std");
pub fn main() !void {
}