container

package
v0.0.0-...-a2a2cd2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: MIT, MIT Imports: 0 Imported by: 0

Documentation

Overview

Package container provides a functional-style compatible immutable list. Users can only append to a list by creating a new list that points to an existing one. Therefore, any existing list remains immuted. It is, in other words, a prepend-only list.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImmutableList

type ImmutableList struct {
	// contains filtered or unexported fields
}

func NewImmutableList

func NewImmutableList(next *ImmutableList, value interface{}) *ImmutableList

func (*ImmutableList) Next

func (head *ImmutableList) Next() (next *ImmutableList)

func (*ImmutableList) ReverseList

func (head *ImmutableList) ReverseList() (r *ImmutableList, size int)

func (*ImmutableList) Value

func (head *ImmutableList) Value() (value interface{})

type Int64Slice

type Int64Slice []int64

func (Int64Slice) Len

func (p Int64Slice) Len() int

func (Int64Slice) Less

func (p Int64Slice) Less(i, j int) bool

func (Int64Slice) Swap

func (p Int64Slice) Swap(i, j int)

Jump to

Keyboard shortcuts

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