Substitution cipher: Difference between revisions

m
Line 882:
shuffle 0 xs = xs
shuffle n xs = iterate go xs !! n
where go [] = []
go xs[] = go (drop 2 xs) <> take 2 xs[]
go xs = go (drop 2 xs) <> take 2 xs
 
convert :: [(Char, Char)] -> String -> String
Line 889 ⟶ 890:
convert m (x:xs) = case lookup x m of
Just c -> c : convert m xs
Nothing -> '😃'x : convert m xs
 
runCommand :: Command -> String
Anonymous user