- heap-change-key! heap datum new-keyprocedure
Change the key of the element with datum to new-key along the heap-gradient.
- The heap in which to change
- The datum whose key to change
- The new key to assign to element with datum
(define (heap-change-key! heap datum new-key) (let ((i (heap-index heap datum))) (if i (heap-change-key!/index heap i new-key) (error "Datum not found -- HEAP-CHANGE-KEY!"))))