I tried executing the below code in Scala shell:
var chars = ('a' to 'z').toArray.zipWithIndex
chars: Array[(Char, Int)] = Array((a,0), (b,1), (c,2), (d,3), (e,4), (f,5), (g,6),
(h,7), (i,8), (j,9), (k,10), (l,11), (m,12), (n,13), (o,14), (p,15), (q,16),
(r,17), (s,18), (t,19), (u,20), (v,21), (w,22), (x,23), (y,24), (z,25))
Now I want the index of every character in the array of tuples mentioned above to be updated by 1 i.e. 'a' at index 1 and z at index 26. How do I achieve this using the map function ?