1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-11-23 22:14:53 +02:00

fix: add inline annotations

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
Dr. Carsten Leue
2025-11-06 10:54:24 +01:00
parent 56c8f1b034
commit 0d3a8634b1
22 changed files with 681 additions and 13 deletions

View File

@@ -296,16 +296,14 @@ func MatchLeft[AS ~[]A, A, B any](onEmpty func() B, onNonEmpty func(A, AS) B) fu
}
}
//go:inline
func Slice[AS ~[]A, A any](start int, end int) func(AS) AS {
return func(a AS) AS {
return a[start:end]
}
return array.Slice[AS](start, end)
}
//go:inline
func SliceRight[AS ~[]A, A any](start int) func(AS) AS {
return func(a AS) AS {
return a[start:]
}
return array.SliceRight[AS](start)
}
func Copy[AS ~[]A, A any](b AS) AS {