slicesx

package
v1.40.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: BSD-3-Clause Imports: 1 Imported by: 9

Documentation

Overview

Package slicesx contains some helpful generic slice functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Interleave

func Interleave[S ~[]T, T any](a, b S) S

Interleave combines two slices of the form [a, b, c] and [x, y, z] into a slice with elements interleaved; i.e. [a, x, b, y, c, z].

func Shuffle

func Shuffle[S ~[]T, T any](s S)

Shuffle randomly shuffles a slice in-place, similar to rand.Shuffle.

Types

This section is empty.

Jump to

Keyboard shortcuts

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