title: Accessing list-of-lists returned from tcl procedure
body: <p>I have a procedure that returns a list of lists. I can't figure out how to access the inner lists without splitting them first. I'm sure there must be a cleaner way. </p>
  
  <p>For example, this:</p>
  
  <pre><code>proc return_l_of_l {} {
    set x {a b c}
    set y {d e f}
    return [list [list $x] [list $y]]
  }
  set l [return_l_of_l]
  set x_list [lindex $l 0]
  set y_list [lindex $l 1]
  
  foreach x $x_list { puts $x }
  foreach y $y_list { puts $y }
  </code></pre>
  
  <p>outputs:</p>
  
  <pre><code>a b c
  d e f
  </code></pre>
  
  <p>not:</p>
  
  <pre><code>a
  b
  c
  d
  e
  f
  </code></pre>