[extern] memcmp = fn [cc(c)] (a: &u8, b: &u8, byte_count: u64) s32; join = fn (slice: []u8, parts: [][]u8) void { >destination_i: u64 = 0; for (part: parts) { >source_i: u64 = 0; while (source_i < part.length) { slice[destination_i] = part[source_i]; destination_i += 1; source_i += 1; } } } [export] main = fn [cc(c)] () s32 { >a = "a"; >b = "b"; >ab = "ab"; >buffer: [2]u8 = undefined; >buffer_slice = buffer[..]; join(buffer_slice, [ a, b ][..]); >result = memcmp(buffer_slice.pointer, ab.pointer, ab.length); return result; }