stores

package
v0.0.0-...-da9ecfa Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: Unlicense Imports: 1 Imported by: 0

Documentation

Overview

Package containing basic collections & data structures

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set[T comparable] struct {
	// contains filtered or unexported fields
}

A super-basic implementation of a set collection.

func EmptySet

func EmptySet[T comparable]() Set[T]

func (Set[T]) Contains

func (self Set[T]) Contains(item T) bool

func (Set[T]) Len

func (self Set[T]) Len() int

func (Set[T]) Put

func (self Set[T]) Put(item T) bool

Adds an item to the Set. Returns true if the Set already contained the given item.

func (Set[T]) Vals

func (self Set[T]) Vals() iter.Seq[T]

Returns an iterator over the contents of the Set.

Jump to

Keyboard shortcuts

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