In Scala, how can I append an Option[A]
to Option[A]
:
Meaning:
Some("foo") ??? Some("bar") == Some("foobar")
In Haskell I'd use an applicative:
ghci>import Control.Applicative
ghci> (++) <$> (Just "foo") <*> (Just "bar")
Just "foobar"
Are there Applicatives
in Scala's standard Typesafe library?