pub fn allEqual(comptime T: type, slice: []const T, scalar: T) bool T: typeslice: []const Tscalar: T1194
1195
1196
1197
1198
1199pub fn allEqual(comptime T: type, slice: []const T, scalar: T) bool {
for (slice) |item| {
if (item != scalar) return false;
}
return true;
}
Returns true if all elements in a slice are equal to the scalar value provided