How can I define an anonymous generic Scala function?
- by Geo
Let's say I have this:
val myAnon:(Option[String],String):String = (a:Option[String],def:String) => {
return a.getOrElse(def)
}
Don't mind what the function does. Is there anyway of making it generic, so I can have an Option[T]?