Commit 44c07fd8 authored by pfdietz's avatar pfdietz

Make digit-char.1 be more informative on failure

parent b0785989
......@@ -132,14 +132,25 @@
t
))))
(defun digit-char.1.body.old ()
(loop for r from 2 to 36 always
(loop for i from 0 to 36
always (let* ((c (digit-char i r))
(result
(if (>= i r) (null c)
(eqlt c (char +extended-digit-chars+ i)))))
(unless result
(format t "~A ~A ~A~%" r i c))
result))))
a
(defun digit-char.1.body ()
(loop
for r from 2 to 36
always
(loop for i from 0 to 36
always (let ((c (digit-char i r)))
(if (>= i r) (null c)
(eqlt c (char +extended-digit-chars+ i)))))))
(loop for r from 2 to 36 nconc
(loop for i from 0 to 36
for c = (digit-char i r)
unless (if (>= i r) (null c)
(eqlt c (char +extended-digit-chars+ i)))
collect (list r i c))))
(defun digit-char-p.1.body ()
(loop for x in *universe*
......
......@@ -184,7 +184,7 @@
(deftest digit-char.1
(digit-char.1.body)
t)
nil)
(deftest digit-char.2
(map 'list #'digit-char (loop for i from 0 to 39 collect i))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment