;; expand/contract list by factor paying no attention to key
(define ivl:expand/contract
(lambda (lst factor)
(cons (car lst)
(let loop ((old (car lst))
(l (cdr lst))
(current (car lst))
(newlst '()))
(if (null? l)
(reverse newlst)
(loop (car l)
(cdr l)
(+ current (* factor (- (car l) old)))
(cons (real->integer (+ current (* factor (- (car l) old))))
newlst)))))))