Documentation
¶
Overview ¶
Package list implements Singly Linked List.
Example ¶
package main import ( "fmt" "slices" "codeberg.org/kurth4cker/go-sample/list" ) func main() { lst := list.List[int]{} for i := range 4 { lst.Push(i) } numbers := slices.Collect(lst.All()) fmt.Println(numbers) }
Output: [3 2 1 0]
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type List ¶
type List[T any] struct { // contains filtered or unexported fields }
Singly Linked List implementation. The zero value for a List is an empty List ready to use.
Click to show internal directories.
Click to hide internal directories.