mes: Add drop, drop-right.
* module/srfi/srfi-1.mes (drop, drop-right): New function.
This commit is contained in:
parent
4ee1c9595e
commit
2748992551
|
@ -131,4 +131,10 @@
|
||||||
(loop (cdr lst))
|
(loop (cdr lst))
|
||||||
(cons (car lst) (loop (cdr lst))))))))
|
(cons (car lst) (loop (cdr lst))))))))
|
||||||
|
|
||||||
|
(define (drop lst n)
|
||||||
|
(list-tail lst n))
|
||||||
|
|
||||||
|
(define (drop-right lst n)
|
||||||
|
(list-head lst (- (length lst) n)))
|
||||||
|
|
||||||
(include-from-path "srfi/srfi-1.scm")
|
(include-from-path "srfi/srfi-1.scm")
|
||||||
|
|
Loading…
Reference in a new issue