This comes from an interview for a sysadmin position.
During the test, I discovered a cookie. It contained a message that was base64 encoded, next it was uuencoded, next was bzip, and last was gzip.
After all that decompressing, it contained the following code:
(let* ((x '((1 2 (3 4 5) 6) 7 8 (9 10))))
;; use car/caaa..r/cd..r here to get 4 from x
)
I think it’s Lisp. I am now trying to find out what this was supposed to do.
I have no knowledge of Lisp, so can anyone help?
A very simple (and maybe the easiest to understand) code:
(car l) gives you the first element of the list l
(cdr l) gives you the remaining elements of the list l (in a list themselves)
Try out each call individually to see what is going on.
It is indeed Lisp. If you want to know a little bit more and be better prepared for future interviews you can try the Casting Spells in Lisp tutorial.