fixed error when no items are present anywhere
parent
e52b3a1085
commit
07bf5ca264
|
@ -197,9 +197,11 @@
|
||||||
[directories-with-nicethings (filter file-exists? paths-to-nicethings)]
|
[directories-with-nicethings (filter file-exists? paths-to-nicethings)]
|
||||||
[directories-with-420 (filter file-has-420-permissions? directories-with-nicethings)]
|
[directories-with-420 (filter file-has-420-permissions? directories-with-nicethings)]
|
||||||
[listof-nicethings (apply append (map file->lines directories-with-420))]
|
[listof-nicethings (apply append (map file->lines directories-with-420))]
|
||||||
[random-number (random (length listof-nicethings))]
|
[list-length (length listof-nicethings)])
|
||||||
[random-nicething (list-ref listof-nicethings random-number)])
|
(when (not (zero? list-length))
|
||||||
(displayln random-nicething)))
|
(let* ([random-number (random list-length)]
|
||||||
|
[random-nicething (list-ref listof-nicethings random-number)])
|
||||||
|
(displayln random-nicething)))))
|
||||||
|
|
||||||
;; ------------------------------------------------
|
;; ------------------------------------------------
|
||||||
;; help
|
;; help
|
||||||
|
|
Loading…
Reference in New Issue