Robert Menke
05/20/2019, 3:28 PMOption
instances. Let’s say I have
val foo = Option("hello")
val bar = Option("world")
fun concat(first: String, second: String): String {
return "$first $second"
}
I want to call concat
with foo
and bar
given that each Option is Some(String)
. What’s the best way to achieve this?