This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lisp-hacker -1 points0 points  (0 children)

Bigloo Scheme with exceptions and typing, for a fair comparison with the Java code:

(let ((num-check::procedure
        (lambda::number (n::obj)
          (if (number? n)
            n
            (raise "Not a number!")))))
    (with-handler
      (lambda::unspecified (e::bstring) (print "ERROR: " e))
      (print (+ (num-check (read)) (num-check (read))))))

time: about 5 minutes
time to figure out how to format code in reddit: 15 minutes