ivl:invert   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/pc_ivl.xtm

Implementation

;; invert list paying no attention to key
(define ivl:invert
   (lambda (lst . args)
      (let ((pivot (if (null? args)
                       (car lst)
                       (car args))))
         (cons (car lst) (map (lambda (i)
                                 (- pivot (- i pivot)))
                              (cdr lst))))))


Back to Index

Similar Entries