Corrections diverses : collection, datetime, ini

This commit is contained in:
Benjamin VAUDOUR 2024-03-04 09:20:42 +01:00
parent c473e663e8
commit fc9b29b7f3
3 changed files with 30 additions and 18 deletions

View file

@ -113,7 +113,7 @@ func ContainsAll[T comparable, S ~[]T](s S, in ...T) bool {
}
// Maps retourne un slice à partir dun autre slice en appliquant une fonction de transformation pour chaque valeur.
func Maps[T1, T2 any, S1 ~[]T1, S2 ~[]T2](in S1, f func(T1) T2) (out S2) {
func Maps[T1, T2 any, S1 ~[]T1, S2 []T2](in S1, f func(T1) T2) (out S2) {
out = make(S2, len(in))
for i, e := range in {