Added first structure: both needed types and init function header
parent
d3fe45cca7
commit
81887e01ed
|
@ -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 {
|
||||
|
||||
}
|
Loading…
Reference in New Issue