Haskell: moving image on horizontal line
问题 Im new to Haskell and am working with images represented as type Img = [String] . I want to move the image either left or right by 1 or more rows with a wrap. i've manged to move the images up or down, code below: moveVer :: Int -> Img -> Img moveVer n xs = take len $ drop (mod n len) $ cycle xs where len = length xs img 1 = XXXXXX OUTPUT = (moveVer (3)(img 1)) = XX XX XX XX XXXXXX XX XXXXXX XXXXXX XX Now i'm trying to do the same thing but move the image horizontally (left or right).