// flatMap?知らない子ですね
// -------------------------------------------------------------
case class User(id: Int, name: String, bestFriendId: Option[Int])
def findUser(userId: Int): Option[User] = Some(User(userId, s"user$userId", Some(userId + 1)))
/** 親友の親友の親友を取得 */
def findBest…