def mainCaller() = {
val name = "xyz"
someList.foreach { u:Map => foo(name, u) }
}
def foo(name:String)(map:Map): Unit = {
//match case....
//recursive call to foo in each case where name remains same, but map changes
}
how can I write foo as a partially applied function, where I dont have to pass name in every recursive call and just call foo(map1)
?