Code piece 1
maps foreach { case (k, v) =>
// do something
}
code piece 2:
maps foreach {
case (k, v) => {
// do something
}
}
I am new to scala. Just wonder whether the above two pieces of codes are the same or not? which one is better?
Thanks