Binary-search: stub function signature doesn't match the tests

The Zig binary-search stub declares binarySearch with a usize target and a []const usize slice, but the tests call binarySearch(T, target, items) with a comptime element type (i4, u16, isize, etc.), so they don’t compile against the stub.

Suggested stub signature:

    pub fn binarySearch(comptime T: type, target: T, items: []const T) ?usize

Happy to open a PR for this if you’d like. I’ll wait for a go-ahead first.

Zig 0.17.1

Sure. Remove the line 1 comment too.

1 Like

Thanks! PR is up: https://github.com/exercism/zig/pull/602

Welcome to the contributor leader board.