list-split-from   scheme


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

Implementation

;; split a list when input element is found
;; remaining part of the list is returned
;
; (list-split-at 'b '(a b c)) ;; +> (b c)
(define list-split-from
    (lambda (element lst)
        (if (member element lst)
            (let ((a (list-position element lst))) 
                a
                (cl:nthcdr a lst)
        ))))


Back to Index