Discover Packages
deedles.dev/trayscale
internal
xslices
package
Version:
v0.9.6
Opens a new window with list of versions in this module.
Published: Apr 27, 2023
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Clear sets every element of s to the zero value of E.
TODO: Replace with clear() builtin when Go 1.21 comes out?
func Filter[E any , S ~[]E](s S, keep func(E) bool ) S
Filter removes any elements from s for which keep(element) is
false.
func Partition[E any , S ~[]E](s S, pred func(E) bool ) (t, f S)
Partition returns two slices, t and f. t contains all elements of s
for which pred() returns true, and f contains all elements for
which pred() returns false.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.