added check for exact numbers

main
m455 2021-04-15 21:35:44 -04:00
parent 672bf1d6c9
commit 33097d6396
1 changed files with 1 additions and 0 deletions

View File

@ -165,6 +165,7 @@
(define (rm/remove-nicething item-number) (define (rm/remove-nicething item-number)
(let ([listof-items (file->lines program-path)]) (let ([listof-items (file->lines program-path)])
(if (and (not (null? listof-items)) (if (and (not (null? listof-items))
(exact? item-number)
(>= item-number 0) (>= item-number 0)
(< item-number (length listof-items))) (< item-number (length listof-items)))
(let* ([item-to-remove (list-ref listof-items item-number)] (let* ([item-to-remove (list-ref listof-items item-number)]