projects
/
jscl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1c4c00
)
New function: integer-to-string
author
David Vazquez
<davazp@gmail.com>
Sun, 16 Dec 2012 21:54:13 +0000
(21:54 +0000)
committer
David Vazquez
<davazp@gmail.com>
Sun, 16 Dec 2012 21:54:13 +0000
(21:54 +0000)
lispstrack.lisp
patch
|
blob
|
history
diff --git
a/lispstrack.lisp
b/lispstrack.lisp
index
b637d10
..
6325f58
100644
(file)
--- a/
lispstrack.lisp
+++ b/
lispstrack.lisp
@@
-23,6
+23,15
@@
separator
(join (cdr list) separator)))))
+(defun integer-to-string (x)
+ (let ((digits nil))
+ (while (not (= x 0))
+ (push (mod x 10) digits)
+ (setq x (truncate x 10)))
+ (join (mapcar (lambda (d) (string (char "0123456789" d)))
+ digits)
+ "")))
+
;;;; Reader
;;; It is a basic Lisp reader. It does not use advanced stuff