title: How to unwrap optional tuple of options to tuple of options in Scala?
body: <p>I have a list of <code>Person</code> and want to retrieve a person by its <code>id</code></p>
  
  <pre><code>val person = personL.find(_.id.equals(tempId))
  </code></pre>
  
  <p>After that, I want to get as a tuple the first and last element of a list which is an attribute of <code>Person</code>.</p>
  
  <pre><code>val marks: Option[(Option[String], Option[String])] = person.map { p =&gt;
                val marks = p.school.marks
                (marks.headOption.map(_.midtermMark), marks.lastOption.map(_.finalMark))
  }
  </code></pre>
  
  <p>This work's fine but now I want to transform the <code>Option[(Option[String], Option[String])]</code> to a simple <code>(Option[String], Option[String])</code>. Is it somehow possible to do this on-the-fly by using the previous map?</p>