I found Programming Praxis via Planet Scheme. The following is my solution to the Rail-Fence Cipher problem in Common Lisp [check out the excelente Common Lisp tutorial by Peter Seibel for learning the language].
My solution doesn't follow the solution proposed in Programming Praxis, because, after looking at the proposal, I think there might be a way to express it more mathematical. With this I mean that what we have is a transformation via a discrete wave pattern. That sounded a bit familiar to fourier transformation. If so, if it can be expressed as such, maybe it would be the cleanest way to do it...
So, for now, the solution I present here is based in the straight-forward non-functional algorithm that one gets if analysing the problem as manipulating a string based on a ciclic list of indexes.
No comments:
Post a Comment