MCPcopy Create free account
hub / github.com/1995parham/linkedlist / newNode

Function newNode

pkg/list/node.go:22–27  ·  view source on GitHub ↗
(data T)

Source from the content-addressed store, hash-verified

20type node[T any] struct {
21 Data T
22 Next Node[T]
23}
24
25func newNode[T any](data T) *node[T] {
26 return &node[T]{
27 Data: data,
28 Next: nil,
29 }
30}

Callers 3

InsertMethod · 0.85
PushFrontMethod · 0.85
PushBackMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected