type BytesView { bytes: Span, } fn secondByte(bytes: Span) -> u8 { return bytes[1] } fn thirdArrayByte(bytes: [4]u8) -> u8 { return bytes[2] } pub fn main(world: World) -> Void raises { let bytes: [4]u8 = [65, 66, 67, 68] let index: usize = 3 let view: BytesView = BytesView { bytes: std.mem.span("ABCD") } if bytes[0] == 65 && secondByte(view.bytes) == 66 && thirdArrayByte(bytes) == 67 && view.bytes[index] == 68 { check world.out.write("indexing primitives ok\n") } }