I'm trying to implement the following function in Haskell, its a recursive traversal that receives an Int and a list of lists [[Int]] and shifts the elements of the inner lists to the right without altering the size of the lists. I was able to get a list with the numbers in the right order but I couldn't insert them back into their proper sublists.
shift_right::Int->[[Int]]->[[Int]]
example #1:
shift_right 1 [[1,2,3],[4,5,6]] => [[6,1,2],[3,4,5]]
example #2:
shift_right 3 [[],[1],[2,3],[4,5,6]] => [[],[4],[5,6],[1,2,3]]