slices

package
v1.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package slices provides a compatibility layer until g1.20 is out of maintenance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinarySearch

func BinarySearch[S ~[]E, E cmp.Ordered](x S, target E) (int, bool)

BinarySearch is used as a wrapper to slices/BinarySearch

func Compact

func Compact[S ~[]E, E comparable](s S) S

Compact is used as a wrapper to slices/Compact.

func Sort

func Sort[S ~[]E, E cmp.Ordered](x S)

Sort is used as a wrapper to slices/Sort.

func SortFunc

func SortFunc[S ~[]E, E any](x S, cmp func(a, b E) int)

SortFunc is used as a wrapper to slices/SortFunc.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL