title: Transforming an `Option[Tuple]` in a scalaz `\/`
body: <p>I am trying to create a connection from an <code>Option[Tuple]</code>, and return
  the result in a disjunction, but my code looks a bit weird:</p>
  
  <pre><code>  def ssh(config: GushConfig): \/[Throwable, Client] = {
      val params = for {
        host &lt;- config.mysqlHost
        port &lt;- config.mysqlPort
        user &lt;- config.mysqlUser
        password &lt;- config.mysqlPassword
        sshAddress &lt;- config.sshTunnelAddress
        sshTunnelUser &lt;- config.sshTunnelUser
      } yield (host, port, user, password, sshAddress, sshTunnelUser)
  
      params match {
        case Some((host, port, user, password, sshAddress, sshTunnelUser)) ⇒
          Try({
            // Do stuff that can fail and throw exceptions
  
            new Client("127.0.0.1", lport, user, password)
          }) match {
            case Success(v) ⇒ v.right
            case Failure(t) ⇒ t.left
          }
        case None ⇒
          new Exception("Not enough parameters to initialize a ssh client").left
      }
    }
  </code></pre>
  
  <p>I first need to pattern match my first <code>Option</code> to check that I have
  all required options, and then if I do, try to connect inside a <code>Try</code>
  and then convert the result of the try into a disjunction.</p>
  
  <p>Is there a nicer way to do this transformation?</p>