title: swift : unexpected traverse print for custom linked list
body: <p>Here is a simple code I have to play with custom List in Swift</p>
  <pre><code>public class Node&lt;Value&gt; {
      public var value: Value
      public var next: Node?
      
      public init(value: Value, next: Node? = nil) {
          self.value = value
          self.next = next
      }
  }
  
  extension Node: CustomStringConvertible {
      public var description: String {
          guard let next = next else {
              return &quot;\(value)&quot;
          }
          
          return &quot;\(value) -&gt; &quot; + String(describing: next) + &quot; &quot;
      }
  }
  
  func creating_and_linking_nodes()
  {
      let node1 = Node(value: 1)
      let node2 = Node(value: 2)
      let node3 = Node(value: 3)
      
      node1.next = node2
      node2.next = node3
      
      print(node1)
  }
  </code></pre>
  <p>I see the following output &quot;1 -&gt; 2 -&gt; 3&quot; which is a bit unexpected for me. Why is the list being traversed by <code>print</code> ? Is it a default behavior ? Is there a way to override it and print only 1 node ?</p>