fn hashMaybeSeed(comptime hash_fn: anytype, seed: anytype, buf: []const u8) @typeInfo(@TypeOf(hash_fn)).@"fn".return_type.?
fn hashMaybeSeed(comptime hash_fn: anytype, seed: anytype, buf: []const u8) @typeInfo(@TypeOf(hash_fn)).@"fn".return_type.? { const HashFn = @typeInfo(@TypeOf(hash_fn)).@"fn"; if (HashFn.param_types.len > 1) { if (@typeInfo(HashFn.param_types[0].?) == .int) { return hash_fn(@intCast(seed), buf); } else { return hash_fn(buf, @intCast(seed)); } } else { return hash_fn(buf); } }