cl:slice   scheme


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

Implementation

;
; slice a list from specified position, returns a list
; (when #f (cl:slice '(1 2 3 4) 2 2))
(define cl:slice
    (lambda (lst start count)
        (if (> start 1)
            (cl:slice (cdr lst) (- start 1) count)
            (cl:slice-left lst count))))


Back to Index

Similar Entries