i am trying to write a scheme program which will take a list of marks as input and gives the output as a list of the grades.
i got this far , .. i dunno whats wrong i get an error the object () passed as the first argument to cdr is not the correct type ....
here is the code
(define (grades list1)
(cons (cond ((= (car list1) 100) 'S)
((= (car list1) 90) 'A))
(cons (grades (cdr list1)) '())))
;
in C is non-standard. (And since neither of these practices is anywhere close to being in an language standard proper, debating this point more is wasting breath for no good reason.) – Eli Barzilay