This might have been asked before, but I would like to understand why you must use the {
syntax for filters or maps using pattern matching,
val arr = Array((1,1), (1,2), (1,5), (2,6), (2,7), (2,3), (3,8), (3,4))
arr.filter(x => x._1 == 1) // works
arr.filter(case(x,y) => x == 1) // doesn't work
arr.filter{case(x,y) => x ==1} //works
Why does the second filter expression not work? Is there a design consideration, since for a person new to the language, understanding that you must use curly brackets instead of regular ones for a special type of filter is hard to figure out or remember.