Chaocipher: Difference between revisions
m
→{{header|Haskell}}
m (→{{header|Haskell}}: Tidied one function in applicative terms.) |
|||
Line 858:
rotated :: Int -> [a] -> [a]
rotated n = take
shifted :: Int -> Int -> [a] -> [a]
shifted src dst s = concat [x, rotated 1 y, b]
where
(a, b) = splitAt dst s
(x, y) = splitAt src a
encode = False
|