First returns the first item of the list.
()
| 24 | |
| 25 | // First returns the first item of the list. |
| 26 | func (l *List[Key, Value]) First() *ListElement[Key, Value] { |
| 27 | return l.head.Next() |
| 28 | } |
| 29 | |
| 30 | // Add adds an item to the list and returns false if an item for the hash existed. |
| 31 | // searchStart = nil will start to search at the head item. |