[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/heap 7f5ab59 10/31: Add heap-root function.
From: |
Stefan Monnier |
Subject: |
[elpa] externals/heap 7f5ab59 10/31: Add heap-root function. |
Date: |
Mon, 14 Dec 2020 12:13:34 -0500 (EST) |
branch: externals/heap
commit 7f5ab5949f8cee6ac516dea90283b7836c8aed6a
Author: Toby Cubitt <toby-predictive@dr-qubit.org>
Commit: tsc25 <toby-predictive@dr-qubit.org>
Add heap-root function.
---
heap.el | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/heap.el b/heap.el
index 2d96f06..027e45f 100644
--- a/heap.el
+++ b/heap.el
@@ -306,6 +306,14 @@ to 1.5"
+(defun heap-root (heap)
+ "Return the root of the heap, without removing it"
+ (if (= (heap--count heap) 0)
+ nil
+ (aref (heap--vect heap) 0)))
+
+
+
(defun heap-delete-root (heap)
"Return the root of the heap and delete it from the heap."
(let (vect root (count (heap--count heap)))
- [elpa] externals/heap 9bcd8d3 16/31: Added heap-build function for efficiently building a heap out of a vector., (continued)
- [elpa] externals/heap 9bcd8d3 16/31: Added heap-build function for efficiently building a heap out of a vector., Stefan Monnier, 2020/12/14
- [elpa] externals/heap ed90e4d 09/31: Adding missing 'buffer setting to customization menu for predictive-auto-add-to-dict., Stefan Monnier, 2020/12/14
- [elpa] externals/heap f74c766 15/31: Converted heap data structures to defstructs., Stefan Monnier, 2020/12/14
- [elpa] externals/heap e354b4f 19/31: Revert default heap size to 10., Stefan Monnier, 2020/12/14
- [elpa] externals/heap e2c16be 06/31: Version 0.10.3 of the predictive completion package., Stefan Monnier, 2020/12/14
- [elpa] externals/heap 75b42f4 04/31: Version 0.9.1 of the predictive completion package., Stefan Monnier, 2020/12/14
- [elpa] externals/heap 2d51c84 01/31: Version 0.1 of the predictive completion package., Stefan Monnier, 2020/12/14
- [elpa] externals/heap 227de61 03/31: Version 0.7 of the predictive completion package., Stefan Monnier, 2020/12/14
- [elpa] externals/heap da9637e 25/31: Added heap-clear function., Stefan Monnier, 2020/12/14
- [elpa] externals/heap 4407826 22/31: More minor whitespace and commentary changes., Stefan Monnier, 2020/12/14
- [elpa] externals/heap 7f5ab59 10/31: Add heap-root function.,
Stefan Monnier <=
- [elpa] externals/heap 304c604 13/31: Fixed bug in heap-copy., Stefan Monnier, 2020/12/14
- [elpa] externals/heap fcf3edd 18/31: Added autoload cookies., Stefan Monnier, 2020/12/14
- [elpa] externals/heap a3ddd78 23/31: Remove ChangeLogs from library headers., Stefan Monnier, 2020/12/14
- [elpa] externals/heap 5ad96c3 14/31: Updated Package-Version, Package-Requires, and Keywords package headers., Stefan Monnier, 2020/12/14
- [elpa] externals/heap 11738aa 12/31: Re-filled to 72 chars/line, for mailing to gnu-emacs-sources list, Stefan Monnier, 2020/12/14
- [elpa] externals/heap 596261c 28/31: Implement iterator generators on collection data structures., Stefan Monnier, 2020/12/14
- [elpa] externals/heap 32e75bb 31/31: * heap.el: Fix first line format, Stefan Monnier, 2020/12/14
- [elpa] externals/heap 8a40ef4 08/31: Version 0.12.1 of the predictive completion package., Stefan Monnier, 2020/12/14
- [elpa] externals/heap 8ece2ad 24/31: Enable lexical binding, and fix issues it picks up., Stefan Monnier, 2020/12/14
- [elpa] externals/heap aa998ae 20/31: Updated copyright attribution and license (GPL2 -> GPL3)., Stefan Monnier, 2020/12/14