Untitled (define ...) ▼ 1: Untit... 1 | #lang racket 2 3 4 6 7 8 9 10 11 2: boolea... Untitled - DrRacket Debug 3: facto
Posted: Tue Jul 05, 2022 10:33 am
Untitled (define ...) ▼ 1: Untit... 1 | #lang racket 2 3 4 6 7 8 9 10 11 2: boolea... Untitled - DrRacket Debug 3: factoria... (define (delete atom list) (cond Macro Stepper # Run Stop 4: leapYea... 5: leapYea... ((empty? list) list) ;Check if condition is ((eq? atom (car list)) (delete atom (cdr list))) true, call the delete function ;Check if condition is false, combine the first element ;with outcome of calling the delete function (else (cons (car list) (delete atom (cdr list)))))) Welcome to DrRacket, version 8.5 [cs]. Language: racket, with debugging; memory limit: 128 MB. > (delete '3 '(2 3 2 3)) (22) ▶