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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user