Back returns the last element of list l or nil if the list is empty.
()
| 415 | |
| 416 | // Back returns the last element of list l or nil if the list is empty. |
| 417 | func (l *LruList[K, V]) Back() *Entry[K, V] { |
| 418 | if l.len == 0 { |
| 419 | return nil |
| 420 | } |
| 421 | return l.root.prev |
| 422 | } |
| 423 | |
| 424 | // lazyInit lazily initializes a zero List Value. |
| 425 | func (l *LruList[K, V]) lazyInit() { |
no outgoing calls
no test coverage detected