Hey guys!
I'm kind of new to LISP and because of this, I have run into the following problem while trying to implement a decimal-to-binary converter:

I'm kind of new to LISP and because of this, I have run into the following problem while trying to implement a decimal-to-binary converter:
(defun bin (x)
(if (eql x 0)
0
(progn
(bin (round (/ x 2)))
(mod x 2))))
The problem here is that I don't know how to do some sort of "integer concatenation", thus I only get a single value, like so:> (bin 5)
1
Help? Last edited by esx_raptor on , edited 1 time in total.