我想做的是这样的:
val myMap: Map[String, => String] = Map(
"name1" -> {//functions that does stuff to generate some string},
"name2" -> {//functions that does something else to return some other string},
...
)
这甚至可能吗?我将如何实现这一目标?我的目标是在我从地图中获取该函数时对其进行评估。