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)
Click to show internal directories.
Click to hide internal directories.