val name: Option[String] = Some("きの子")
val greet = name.map(n => s"${n}さんこんにちは") // greet: Option[String] = Some(きの子さんこんにちは)
greet.getOrElse("なまえがないよ") // Optionから値をとりだした。 res1: String = きの子さんこんにちは
val name: String? = "きの子"
name?.let { n -> "${n}さんこんにちは" } // nameに値が入っている場合にlet関数を適用している