15
I'm new to Scala and i was wondering how you can call the next element of the list because I am trying to compare the current element with the adjacent one. Given x as the current element, I tried similar to java, x+1 but that didnt work. Any help?
for (x <- list; if (x == (next adj. element))) println("same")