diff options
Diffstat (limited to 'src/lisp')
-rw-r--r-- | src/lisp/core.lisp.in | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in index 49396264..74f43cf1 100644 --- a/src/lisp/core.lisp.in +++ b/src/lisp/core.lisp.in @@ -83,8 +83,9 @@ "%SimpleArray" ;; Some common data structures - "tableValue" ; value associated with a key in a table - "tableLength" ; number of entries in the table. + "makeTable" ; construct a hash table with a given comp function + "tableValue" ; value associated with a key in a table + "tableLength" ; number of entries in the table. "tableRemove!" ; remove an entry from a table ;; IO @@ -132,6 +133,7 @@ "%ByteArray" "makeByteArray" + "makeBitVector" "makeString" "%hasFeature" @@ -454,6 +456,9 @@ (t -1)))) ;; -*- Hash table -*- +(defmacro |makeTable| (cmp) + `(make-hash-table :test ,cmp)) + (defmacro |tableValue| (ht k) `(gethash ,k ,ht)) @@ -1303,6 +1308,9 @@ :element-type '(unsigned-byte 8) :initial-element 0)) +(defmacro |makeBitVector| (n) + `(make-array ,n :element-type 'bit :initial-element 0)) + (defun |makeString| (n &optional (c (code-char 0))) (make-string n :initial-element c)) |