stopped user from being able to remove a number that isn't in the list
parent
64681f005e
commit
a6fb9c3d29
5
args.rkt
5
args.rkt
|
@ -1,6 +1,7 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
|
|
||||||
(require racket/vector
|
(require racket/vector
|
||||||
|
racket/list
|
||||||
"config.rkt"
|
"config.rkt"
|
||||||
"init.rkt"
|
"init.rkt"
|
||||||
"util.rkt"
|
"util.rkt"
|
||||||
|
@ -27,7 +28,9 @@
|
||||||
|
|
||||||
[(and
|
[(and
|
||||||
(equal? args-length 2)
|
(equal? args-length 2)
|
||||||
(equal? (vector-member remove-command args) 0))
|
(equal? (vector-member remove-command args) 0)
|
||||||
|
(not (equal? (vector-member "0" args) 1))
|
||||||
|
(vector-member (vector-ref args 1) (list->vector (map number->string (range (length (file->string-list path)))))))
|
||||||
(remove-item args)]
|
(remove-item args)]
|
||||||
|
|
||||||
[(and
|
[(and
|
||||||
|
|
Loading…
Reference in New Issue