Documentation ¶
Overview ¶
Package islist provides an intrusive singly linked list
Deprecated: Will be replaced by icontainer.SList
Index ¶
- func WriteList(wr io.Writer, ls *List, opts *WriteOpts) (n int, err error)
- type Element
- type List
- func (l *List) Drop(n int) *List
- func (l *List) Front() Node
- func (l *List) Init()
- func (l *List) Len() int
- func (l *List) PushBack(n Node) *List
- func (l *List) PushBackAll(ns ...Node) *List
- func (l *List) PushFront(n Node) *List
- func (l *List) Revert() *List
- func (l *List) String() string
- func (l *List) Tail() *List
- type Node
- type NodeBase
- type WriteOpts
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Element ¶
type Element struct { Value interface{} // contains filtered or unexported fields }
Example ¶
ls := New(E("foo"), E("bar")) ls.PushFront(E(0)).PushBack(E(1)) WriteList(os.Stdout, ls, DefaultWrOpts(func(wr io.Writer, e interface{}) (int, error) { return fmt.Fprint(wr, e.(*Element).Value) }))
Output: (0 foo bar 1)
func (*Element) SetListNext ¶
type List ¶
type List struct {
// contains filtered or unexported fields
}
func (*List) PushBackAll ¶
type NodeBase ¶
type NodeBase struct {
// contains filtered or unexported fields
}
func (*NodeBase) SetListNext ¶
Click to show internal directories.
Click to hide internal directories.