bumped up golang version to 1.23

This commit is contained in:
2025-06-22 19:35:57 +02:00
parent efc99a9658
commit cc2ead6c4e
11 changed files with 68 additions and 30 deletions

View File

@ -1,10 +1,10 @@
package slices
func Each[T any](slice []T, f func(T)) {
func Each[T any](slice []T, f Consumer[T]) {
EachIndex(slice, func(_ int, v T) { f(v) })
}
func EachIndex[T any](slice []T, f func(int, T)) {
func EachIndex[T any](slice []T, f IndexedConsumer[T]) {
for i, v := range slice {
f(i, v)
}