Scheme interpreter for problem 224 not working

Back to General discussions forum

boerdereinar     2021-05-02 15:45:44

All code I've written on https://tinyscheme-r7.sourceforge.io/emu.html always seems to return error code 255. Even the following simple program returns error code 255.

(define (transpose x) (car (car x)))
Rodion (admin)     2021-05-02 17:47:52
User avatar

Hi Friend!

Sorry for confusion - the problem statement lacks minimal example - I just added it:

(define (transpose x)
    '())

The trouble with your code is that x may not have car (e.g. if checker runs against empty list).

I shall try to see if error reporting in such cases could be made more clear...

Please login and solve 5 problems to be able to post at forum