Scala - return a function from a map -


in scala, how declare & instantiate map returns function (for sake of argument? function accepts 2 variables, 1 string, 1 int)?

i envisioning:

val mymap = map[string, (string,int)=>boolean](     goes here??? ) 

let's map string "a" cool function. don't care function - returns true, perhaps?

try this:

  val mymap = map[string, (string, int) => boolean](     "test" -> ((s, i)  => true)   ) 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -