You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: list_element.go
    path of file: ./repos/gotosocial/vendor/github.com/cornelk/hashmap
    
    the code of the file until where you have to start completion: package hashmap

import (
	"sync/atomic"
)

// ListElement is an element of a list.
type ListElement[Key comparable, Value any] struct {
	keyHash uintptr

	// deleted marks the item as deleting or deleted
	// this is using uintptr instead of atomic.Bool to avoid usi
    
func (e *ListElement[Key, Value]) Next() *ListElement[Key, Value] {
	for next := e.next.Load(); next != nil; {
		// if the next item is not deleted, return it
		if next.deleted.Load() == 0 {
			return next
		}

		// point current elements next to the following item
		// after the deleted one until a non deleted or list end is found
		following := next.Next()
		if e.next.CompareAndSwap(next, following) {
			next = following
		} else {
			next = next.Next()
		}
	}
	return nil // end of the list reached
}