ring_ext

package
v0.0.0-...-e3d9ab2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Each

func Each[Val any](r *ring.Ring[Val], f func(*ring.Ring[Val]))

func Find

func Find[Val comparable](r *ring.Ring[Val], needle Val) *ring.Ring[Val]

return nil if needle is not found in ring

func GetSurroundingValues

func GetSurroundingValues[Val comparable](r *ring.Ring[Val], me Val, distance int) []Val

func NewWithValues

func NewWithValues[Val any](values []Val) *ring.Ring[Val]

Returns a ring that contains references to all the values from the given array. The returned ring is the first in the array

func SomeNext

func SomeNext[Val any](r *ring.Ring[Val], f func(Val) bool) *ring.Ring[Val]

func SomePrev

func SomePrev[Val any](r *ring.Ring[Val], f func(Val) bool) *ring.Ring[Val]

Types

This section is empty.

Jump to

Keyboard shortcuts

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