Replace all occurrences of match with replacement.
pub fn replaceScalar(comptime T: type, slice: []T, match: T, replacement: T) void
pub fn replaceScalar(comptime T: type, slice: []T, match: T, replacement: T) void {
for (slice) |*e| {
if (e.* == match)
e.* = replacement;
}
}