# Chatper 6: LinkedList COW optimization of sharing nodes also works for \`pop()\` operations

**URL:** <https://forums.kodeco.com/t/chatper-6-linkedlist-cow-optimization-of-sharing-nodes-also-works-for-pop-operations/183549>\
**Category:** Data Structures & Algorithms in Swift\
**Created:** [February 5, 2023, 12:50am UTC](https://forums.kodeco.com/t/chatper-6-linkedlist-cow-optimization-of-sharing-nodes-also-works-for-pop-operations/183549 "2023-02-05T00:50:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alyakan](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/alyakan/32/105896_2.png) [@alyakan](https://forums.kodeco.com/u/alyakan)\
**Post date:** [February 5, 2023, 12:50am UTC](https://forums.kodeco.com/t/chatper-6-linkedlist-cow-optimization-of-sharing-nodes-also-works-for-pop-operations/183549/1 "2023-02-05T00:50:34Z")

</div>

The book mentions the following at the very end of Chapter 6:

> The unidirectional nature of the linked list means that head-first insertions can ignore the “COW tax”!

However, I believe this also applies to `pop()` operations as I’ve tested it by removing the `copyNodes()` from the `pop()` function and this was the result:

```swift
example(of: "non COW pop") {
    var list = LinkedList<Int>()
    list.push(3)
    list.push(2)
    list.push(1)
    var list2 = list
    list.pop()

    print(list)
    print(list2)
}

// Console
---Example of non COW pop---
[2] --> [3] 
[1] --> [2] --> [3]  

```
