stack

package
v0.0.0-...-0e61b49 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stack

type Stack[T any] []T

First-in-last-out stack

func Empty

func Empty[T any]() Stack[T]

func FromSlice

func FromSlice[T any](xs []T) Stack[T]

func (Stack[T]) Len

func (s Stack[T]) Len() uint

func (Stack[T]) Peek

func (s Stack[T]) Peek() maybe.Maybe[T]

func (Stack[T]) Pop

func (s Stack[T]) Pop() (maybe.Maybe[T], Stack[T])

func (Stack[T]) Push

func (s Stack[T]) Push(x T) Stack[T]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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