func (ll *LinkedList[T]) Shift() T {
	var d T
	if ll.length == 0 || ll.head == nil {
		return d
	}
	d = ll.head.data
	_ = ll.head.Remove()
	return d
}
// Shift removes the first item of the list and returns its data.
Shift removes the first item of the list and returns its data.
// Shift removes the first item of the list and returns its data .
func (ll *LinkedList[T]) Shift() T {
	var d T
	if ll.length == 0 || ll.head == nil {
		return d
	}
	d = ll.head.data
	_ = ll.head.Remove()
	return d
}
func ( ll * LinkedList [ T ] ) Shift ( ) T { var d T if ll . length == 0 || ll . head == nil { return d } d = ll . head . data _ = ll . head . Remove ( ) return d }
Shift removes the first item of the list and returns its data.
Shift removes the first item of the list and returns its data .