[plt-scheme] More detailed description of what made the PLT Scheme IDE crash

From: Jon Loldrup (loldrup at gmail.com)
Date: Sun Mar 22 08:51:04 EDT 2009

Using Dr. Scheme 4.1.4 Danish on Windows XP sp3, and with "language"
set to "rutineret" (the danish word for "advanced" or something like
that), this was the code that made Dr. Scheme crash when I ran it:


(define atom?
  (lambda (a)
    (not (pair? a))))

(define numbered?
  (lambda (aexp)
    (cond
      ((atom? aexp) (number? aexp))
      (else (and (numbered? (car aexp)) (numbered? (car (cdr (cdr
aexp)))))))))
'TEST_AF_numbered?:
(numbered? '())
(numbered? '(1 1 1))
(numbered2? 'mumba)
(numbered2? '(1 + 3 + (2 x 3)))
(numbered2? '(1 + mumba + (2 x 3)))
(numbered2? '(im singing in the rain))

(define numbered2?
  (lambda (aexp)
    (cond
      ((atom? aexp) (number? aexp))
      ((eq? (car (cdr aexp)) '+) (and (numbered2? (car aexp))
(numbered2? (car (cdr (cdr aexp))))))
      ((eq? (car (cdr aexp)) 'x) (and (numbered2? (car aexp))
(numbered2? (car (cdr (cdr aexp))))))
      ((eq? (car (cdr aexp)) '^) (and (numbered2? (car aexp))
(numbered2? (car (cdr (cdr aexp))))))
      (else #f))))
'TEST_AF_numbered2?:
(numbered2? '())
(numbered2? '(1 1 1))
(numbered2? 'mumba)
(numbered2? '(1 + 3 + (2 x 3)))
(numbered2? '(1 + mumba + (2 x 3)))
(numbered2? '(im singing in the rain))


Posted on the users mailing list.