I want to use tuple returned from a method to make a new hashmap item but it gives me error when I write like this
var data= HashMap[String,String]()
data.update(choose("name"))
def choose(a:String):(String,String)= return (a, "Pete")
How do you use tuple to update the hashmap?
Eclipse IDE tells me "not enough arguments for method update: (key: String, value: String)Unit. Unspecified value parameter value." and won't let me compile the script.
data.update()does not accept a tuple.