Assume I have a mutableMap:
val MM = mutableMapOf()
Now I define a function as a method for it:
MM["testF"] = fun () {
println("WOW")
}
Now I want to call it in another place:
val MMTF = MM["testF"] as Function<*>
MMTF() <-- NOT WORKING
Any help will be appreciated.
This code will print bar