I’m trying to remove all possible redundancies from my code without imparing in loss of readability. I came across a difficult case. I have two functions that do exactly the same thing except for one line of code but they are conceptually different. The functions encrypt and decrypt a given string. Both have other function callings and loops, they only difer in how they assign one variable once. How can I possibly remove this redundancy from my code? Or shouldn’t be removed for readability reasons?

0 Answers