I am starting with Racket and I want to display the value of this function that adds the cdrs of a list of cons, in Racket:
(define (add-cdrs '((a . 1)(a . 2)(a . 3)(a . 4)))
(if (null? l)
0
(+ (cdr(car l))(add-cdrs(cdr l)))))
The output should be: 10
But, I don't know how to do it or where to put the display function.
Thank you