xslices

package
v0.0.0-...-4804628 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package xslices provides more generic functions in the spirit of the slices package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Last

func Last[S ~[]E, E any](s S) E

Last returns the last element in s. Last panics if len(s) == 0.

func Pop

func Pop[S ~[]E, E any](s S, n int) S

Pop sets the last n elements of the slice to zero values and returns s[:len(s)-n].

Types

This section is empty.

Jump to

Keyboard shortcuts

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