title: Vavr - turn List of Lists into single List
body: <p>I've got two vavr Lists:</p>
  
  <pre><code>List&lt;Object&gt; list1 = List.of("one", "two", "three", "for");
  List&lt;Object&gt; list2 = List.of("one", "two", List.of("three", "for"));
  </code></pre>
  
  <p>How can I transform the <code>list2</code> to be equal to the <code>list1</code>?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I try to explain more what I want to achive:</p>
  
  <pre><code>System.out.println("list1: " + list1);
  System.out.println("list2: " + list2);
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>list1: List(one, two, three, for)
  list2: List(one, two, List(three, for))
  </code></pre>
  
  <p>I want to flattening all inner lists in the <code>list2</code>, so the flattened list should be equal to <code>list1</code>:</p>
  
  <pre><code>System.out.println("flattened: " + flattened);
  System.out.println(list1.equals(flattened));
  </code></pre>
  
  <p>Should return:</p>
  
  <pre><code>flattened: List(one, two, three, for)
  true
  </code></pre>