練習のために、100 行程度からこれまでの簡単な JDBC をいくつか取得しましたが、型チェックは行いません。何か案は?より良いアプローチ?
def withResultSet[T](sql: String, f: ResultSet => T)(implicit info: ConnectionInfo): Try[T] = {
    for {
      conn <- Try(connect(info))
      stmt <- Try(conn.createStatement()) orElse { case err: SQLException => {conn.close(); err} }
      results <- Try(stmt.executeQuery(sql)) orElse { case err: SQLException => { conn.close(); stmt.close(); err }}
    } yield f(results)
  }
そして私のエラーは
 missing parameter type for expanded function
The argument types of an anonymous function must be fully known. (SLS 8.5)
Expected type was: scala.util.Try[?]
      stmt <- Try(conn.createStatement()) orElse { case err: SQLException => {conn.close(); err} }
                                                 ^