From 274899255115a979592303f746c475ed56cfaee0 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 26 May 2018 20:47:33 +0200 Subject: [PATCH] mes: Add drop, drop-right. * module/srfi/srfi-1.mes (drop, drop-right): New function. --- module/srfi/srfi-1.mes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/module/srfi/srfi-1.mes b/module/srfi/srfi-1.mes index 494a197e..62d47018 100644 --- a/module/srfi/srfi-1.mes +++ b/module/srfi/srfi-1.mes @@ -131,4 +131,10 @@ (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")