indirect enumLinkedList<Element:Comparable>{caseEmptycaseNode(value:Element, next:LinkedList)}extensionLinkedList{publicfuncremove(e:Element)->LinkedList{guardcaselet.Node(value, next)=selfelse{return.Empty}return value == e ? next :LinkedList.Node(value: value, next: next.remove(e: e))}publicfuncaddHead(e:Element)->LinkedList{returnLinkedList.Node(value: e, next:self)}}