- heap-change-key! heap datum new-keyprocedure
Change the key of the element with datum to new-key along the heap-gradient.
- heap
- The heap in which to change
- datum
- The datum whose key to change
- new-key
- 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!"))))