Created
November 23, 2018 14:31
-
-
Save Solid-Color-Labs/fae6627ce9793379e1c91e8e978dd278 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(args: Array[String]): Unit = { | |
val myMap = Map("int" -> 1, "double" -> 2.5, "string" -> "my string") | |
val mappedMap = myMap.mapValues { | |
case s: String => Option(s).getOrElse("") | |
// case b: Boolean => Option.fold() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment