Fix list-range to not blow up when out of range
This commit is contained in:
parent
ea225293e6
commit
32fb1697d4
@ -9,7 +9,10 @@
|
||||
(provide (all-defined-out))
|
||||
|
||||
(define (list-range lst start end)
|
||||
(take (drop lst start) (- end start)))
|
||||
(let ((dropped (drop lst start)))
|
||||
(if (>= (length dropped) (- end start))
|
||||
(take dropped (- end start))
|
||||
dropped)))
|
||||
|
||||
(define (post->source post)
|
||||
(get-source (path->string (path->complete-path (symbol->string post)))))
|
||||
|
Loading…
Reference in New Issue
Block a user