take   scheme


Defined in:  https://github.com/lambdamusic/extempore-extensions/blob/main/init/init_lisp.xtm

Implementation

;
;; nth reversed and 1-based
; (take 9 (:mkscalerel 62 1 'dorian 8))
(define take (lambda (index_1_based lst)
    (if (< (length lst) index_1_based)
        (log-info "List too short for take")
        (list-ref lst (- index_1_based 1)))))


Back to Index

Similar Entries