The hash-table-ext Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The hash-table-ext Reference Manual

This is the hash-table-ext Reference Manual, version 1.0.8, generated automatically by Declt version 3.0 "Montgomery Scott" on Wed Oct 13 11:06:25 2021 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

HASH-TABLE-EXT 1.0.0

What is this?

Tiny extensions for common lisp hash-tables.

Alternatives and differences.

| |cl-ana.hash-table-utils| alexandria | cl-hash-table-destructuring | cl-hash-util | hash-set | hash-table-ext | | --- | --- | --- | --- | --- | --- | --- | | Scope | wide | wide | narrow | narrow | narrow | narrow | | Converting | alist | a/plist | | a/plist | | | | Listuping | k/v | k/v | | k | k/v | | | Getter for nested | | | | * | | | | Iteration | * | | | | * | * | | Binding | | | * | * | | * | | Set ops | | | | | * | * | | As CLOS object | | | | | * | |

Usage

For detail, see spec file.

From developer

Product's goal

License

MIT

Developed with

SBCL

Tested with

Installation


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 hash-table-ext

Author

SATO Shinichi

Source Control

(:git "git@github.com:hyotang666/hash-table-ext")

Bug Tracker

https://github.com/hyotang666/hash-table-ext/issues

License

MIT

Description

Tiny extensions for common lisp hash-tables.

Version

1.0.8

Dependency

alexandria

Source

hash-table-ext.asd (file)

Component

hash-table-ext.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 hash-table-ext.asd

Location

/home/quickref/quicklisp/dists/quicklisp/software/hash-table-ext-20210807-git/hash-table-ext.asd

Systems

hash-table-ext (system)


Previous: , Up: Lisp files   [Contents][Index]

3.1.2 hash-table-ext/hash-table-ext.lisp

Parent

hash-table-ext (system)

Location

hash-table-ext.lisp

Packages

hash-table-ext

Exported Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 hash-table-ext

Source

hash-table-ext.lisp (file)

Nickname

ht

Use List

common-lisp

Exported Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Macros

Macro: doht ((V-KEY &optional V-VALUE) HASH-FORM &optional RETURN) &body BODY

# DOHT

## Description:

### syntax (DOHT ((v-key &optional v-value) hash-form &optional return)
&body
body)
=> result

## Arguments and Values:
v-key := symbol, otherwise signals implementation dependent condition.

“‘lisp
#?(DOHT (("not symbol") (MAKE-HASH-TABLE)))
:signals CONDITION
“‘
Not evaluated.

“‘lisp
#?(doht ((intern "NOT EVALUATED")) (make-hash-table))
:signals condition
“‘
Bound by each keys of hash-table.

“‘lisp
#?(let ((result))
(doht ((k) (pairht ’(:a :b) ’(1 2)))
(push k result))
result)
:satisfies (lambda (result) (null (set-exclusive-or result ’(:a :b))))
“‘
You can use ‘NIL‘ for k when what you interests is only value.

“‘lisp
#?(let (result)
(doht ((nil v) (pairht ’(:a :b) ’(1 2)))
(push v result))
result)
:satisfies (lambda (result) (null (set-exclusive-or result ’(1 2))))
“‘
v-value := symbol, otherwise signals implementation dependent condition.

“‘lisp
#?(DOHT ((KEY "not symbol") (MAKE-HASH-TABLE)))
:signals CONDITION
“‘
Not evaluated

“‘lisp
#?(doht ((key (intern "NOT EVALUATED")) (make-hash-table)))
:signals condition
“‘
Bound by each value of hash-table.

“‘lisp
#?(let (result)
(doht ((k v) (pairht ’(:a :b) ’(1 2)))
(push (cons k v) result))
result)
:satisfies (lambda (result) (null (set-exclusive-or result ’((:a . 1) (:b . 2)) :test #’equal))) “‘
hash-form := The form which generates hash-table, otherwise signals implementation dependent condition.

“‘lisp
#?(DOHT ((KEY) "not hash-table"))
:signals CONDITION
“‘
return := NIL, if specified this form is evaluated at last and return its values.

“‘lisp
#?(let (result)
(doht ((k) (pairht ’(:a :b) ’(1 2)) (push :last result))
(push k result))
result)
:satisfies (lambda (result) (null (set-exclusive-or result ’(:a :b :last))))
“‘
In the RETURN form, variable v-key and v-value is visible but NIL.

“‘lisp
#?(doht((k v) (pairht ’(:a) ’(1)) (list k v))
(princ (list k v)))
=> (NIL NIL)
, :stream
“‘
body := implicit progn.
Declarable.

“‘lisp
#?(doht ((k) (pairht ’(:a) ’(1)))
(declare (type symbol k))
(princ k))
:outputs "A"
“‘
Returnable.

“‘lisp
#?(doht ((nil v) (pairht ’(:a :b :c) ’(1 2 3)))
(if (evenp v)
(return v)))
=> 2
“‘
GOable.

“‘lisp
#?(let (result)
(doht ((nil v) (pairht ’(:a :b :c) ’(1 2 3)))
(when (evenp v)
(go :end))
(push v result)
:end)
result)
:satisfies (lambda (result) (null (set-exclusive-or result ’(1 3))))
“‘
result := NIL as default.

“‘lisp
#?(doht ((k) (make-hash-table))
(princ k))
=> NIL
“‘
If RETURN is specified all values are returned.

“‘lisp
#?(doht ((k v) (make-hash-table) (values k v))
(format t "~A~A" k v))
:values (NIL NIL)
“‘

## Affected By:
none.

## Side-Effects:
none.

## Notes:
See [Traversal rules and side effect.](http://clhs.lisp.se/Body/03_f.htm)

## Exceptional-Situations:

Package

hash-table-ext

Source

hash-table-ext.lisp (file)

Macro: with-gethash (&rest DEFS) HASH-TABLE-FORM &body BODY

# WITH-GETHASH

## Description:

### syntax (WITH-GETHASH (&rest defs) hash-table-form &body body)
=> result

## Arguments and Values:
def+ := (name keyform)
When malformed, signals implementation dependent condition.

“‘lisp
#?(WITH-GETHASH ("not def form")
(MAKE-HASH-TABLE))
:signals CONDITION
“‘

“‘lisp
#?(WITH-GETHASH ((LESS-ELEMENT))
(MAKE-HASH-TABLE))
:signals CONDITION
“‘

“‘lisp
#?(WITH-GETHASH ((TOO MUCH ELEMENTS))
(MAKE-HASH-TABLE))
:signals CONDITION
“‘
name := symbol, otherwise signals implementation dependent condition.

“‘lisp
#?(WITH-GETHASH (("not symbol" :DUMMY))
(MAKE-HASH-TABLE))
:signals CONDITION
“‘
Not evaluated.

“‘lisp
#?(WITH-GETHASH (((INTERN "Not evaluated") :KEY))
(MAKE-HASH-TABLE))
:signals CONDITION
“‘
keyworm := form which generates key for hash-table.

“‘lisp
#?(LET ((HT (MAKE-HASH-TABLE)))
(WITH-GETHASH ((NAME :KEY)) HT
(setf name :value)
ht))
:satisfies (lambda (result)
(equalp result (pairht ’(:key) ’(:value))))
“‘
Evaluated only once.

“‘lisp
#?(LET ((HT (MAKE-HASH-TABLE)))
(WITH-GETHASH ((NAME (PRINC :KEY))) HT
(setf name :value)
name))
:outputs "KEY"
“‘
hash-table-form := Form which generates hash-table, otherwise signals implementation dependent condition.

“‘lisp
#?(with-gethash ((name :key)) "not hash-table")
:signals CONDITION
“‘
body := Implicit progn.
result := T

## Affected By:
none

## Side-Effects:
none

## Notes:

## Exceptional-Situations:

Package

hash-table-ext

Source

hash-table-ext.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: copy-ht TABLE &key KEY TEST SIZE REHASH-SIZE REHASH-THRESHOLD

Returns a copy of hash table TABLE, with the same keys and values as the TABLE. The copy has the same properties as the original, unless overridden by the keyword arguments.

Before each of the original values is set into the new hash-table, KEY is invoked on the value. As KEY defaults to CL:IDENTITY, a shallow copy is returned by default.

Package

hash-table-ext

Source

/home/quickref/quicklisp/dists/quicklisp/software/alexandria-20210807-git/alexandria-1/hash-tables.lisp

Function: ht-adjoin KEY VALUE HASH-TABLE

# HT-ADJOIN

## Description:

### syntax (HT-ADJOIN key value hash-table)
=> result

## Arguments and Values:
key := t
value := t
hash-table := hash-table, otherwise signals implementation dependent condition.

“‘lisp
#?(HT-ADJOIN T T "not hash-table")
:signals CONDITION
“‘
result := hash-table

## Affected By:

## Side-Effects:
Third argument ‘HASH-TABLE‘ may modified.

“‘lisp
#?(HT-ADJOIN :A 1 (MAKE-HASH-TABLE))
:satisfies (lambda (result) (equalp result (pairht ’(:a) ’(1))))
“‘

“‘lisp
#?(HT-ADJOIN :A 1 (PAIRHT ’(:A) ’(2)))
:satisfies (lambda (result) (equalp result (pairht ’(:a) ’(2))))
“‘

## Notes:

## Exceptional-Situations:

Package

hash-table-ext

Source

hash-table-ext.lisp (file)

Function: ht-intersection HT1 HT2 &optional FUNCTION

# HT-INTERSECTION

## Description:

### syntax (HT-INTERSECTION ht1 ht2 &optional (function #’left))
=> result

## Arguments and Values:
ht1 := hash-table, otherwise signals implementation dependent condition.

“‘lisp
#?(HT-INTERSECTION "not hash-table" (MAKE-HASH-TABLE))
:signals CONDITION
“‘
ht2 := hash-table, otherwise signals implementation dependent condition.

“‘lisp
#?(HT-INTERSECTION (MAKE-HASH-TABLE) "not hash-table")
:signals CONDITION
“‘
function := function, otherwise signals implementation dependent condition.

“‘lisp
#?(HT-INTERSECTION (MAKE-HASH-TABLE) (MAKE-HASH-TABLE)
"not (or symbol function)")
:signals CONDITION
“‘
The default is #’LEFT which keeps ht1 value.

“‘lisp
#?(HT-INTERSECTION (PAIRHT ’(:A :B) ’(1 2)) (PAIRHT ’(:B :C) ’(3 4))) :satisfies (lambda (result) (equalp result (pairht ’(:b) ’(2))))
“‘
The FUNCTION shoud be ftype as (function (t t)) which accepts v1 and v2.

“‘lisp
#?(HT-INTERSECTION (PAIRHT ’(:A :B) ’(1 2)) (PAIRHT ’(:B :C) ’(3 4)) #’+) :satisfies (lambda (result) (equalp result (pairht ’(:b) ’(5))))
“‘
result := hash-table

“‘lisp
#?(HT-INTERSECTION (MAKE-HASH-TABLE) (MAKE-HASH-TABLE))
:satisfies (lambda (result) (equalp result (make-hash-table)))
“‘

## Affected By:
none.

## Side-Effects:
none.

## Notes:

## Exceptional-Situations:

Package

hash-table-ext

Source

hash-table-ext.lisp (file)

Function: ht-null HASH-TABLE

# HT-NULL

## Description:

### syntax (HT-NULL hash-table)
=> result

“‘lisp
#?(HT-NULL (MAKE-HASH-TABLE))
=> T
“‘

“‘lisp
#?(HT-NULL (PAIRHT ’(:A) ’(1)))
=> NIL
“‘

## Arguments and Values:
hash-table := hash-table, otherwise signals implementation dependent condition.

“‘lisp
#?(HT-NULL "not hash-table")
:signals CONDITION
“‘
result := boolean

## Affected By:
none.

## Side-Effects:
none.

## Notes:

## Exceptional-Situations:

Package

hash-table-ext

Source

hash-table-ext.lisp (file)

Function: ht-set-difference HT1 HT2

# HT-SET-DIFFERENCE

## Description:

### syntax (HT-SET-DIFFERENCE ht1 ht2)
=> result

## Arguments and Values:
ht1 := hash-table, otherwise signals implementation dependent condition.

“‘lisp
#?(HT-SET-DIFFERENCE "not hash-table" (MAKE-HASH-TABLE))
:signals CONDITION
“‘
ht2 := hash-table, otherwise signals implementation dependent condition.

“‘lisp
#?(HT-SET-DIFFERENCE (MAKE-HASH-TABLE) "not hash-table")
:signals CONDITION
“‘
result := hash-table

“‘lisp
#?(HT-SET-DIFFERENCE (PAIRHT ’(:A :B) ’(1 2)) (PAIRHT ’(:B :C) ’(3 4))) :satisfies (lambda (result) (equalp result (pairht ’(:a) ’(1))))
“‘

## Affected By:
none.

## Side-Effects:
none.

## Notes:

## Exceptional-Situations:

Package

hash-table-ext

Source

hash-table-ext.lisp (file)

Function: ht-set-exclusive-or HT1 HT2

# HT-SET-EXCLUSIVE-OR

## Description:

### syntax (HT-SET-EXCLUSIVE-OR ht1 ht2)
=> result

## Arguments and Values:
ht1 := hash-table, otherwise signals implementation dependent condition.

“‘lisp
#?(HT-SET-EXCLUSIVE-OR "not hash-table" (MAKE-HASH-TABLE))
:signals CONDITION
“‘
ht2 := hash-table, otherwise signals implementation dependent condition.

“‘lisp
#?(HT-SET-EXCLUSIVE-OR (MAKE-HASH-TABLE) "not hash-table")
:signals CONDITION
“‘
result := hash-table

“‘lisp
#?(HT-SET-EXCLUSIVE-OR (PAIRHT ’(:A :B) ’(1 2)) (PAIRHT ’(:B :C) ’(3 4))) :satisfies (lambda (result) (equalp result (pairht ’(:a :c) ’(1 4)))) “‘

## Affected By:
none.

## Side-Effects:
none.

## Notes:

## Exceptional-Situations:

Package

hash-table-ext

Source

hash-table-ext.lisp (file)

Function: ht-union HT1 HT2 &optional FUNCTION

# HT-UNION

## Description:

### syntax (HT-UNION ht1 ht2 &optional (function #’left))
=> result

## Arguments and Values:
ht1 := hash-table, otherwise signals implementation dependent condition.

“‘lisp
#?(HT-UNION "not hash-table" (MAKE-HASH-TABLE))
:signals CONDITION
“‘
ht2 := hash-table, otherwise signals implementation dependent condition.

“‘lisp
#?(HT-UNION (MAKE-HASH-TABLE) "not hash-table")
:signals CONDITION
“‘
function := function, otherwise signals implementation dependent condition.

“‘lisp
#?(HT-UNION (MAKE-HASH-TABLE) (MAKE-HASH-TABLE) "not (or symbol function)") :signals CONDITION
“‘
The default is #’LEFT which keeps HT1 value.

“‘lisp
#?(HT-UNION (PAIRHT ’(:A :B) ’(1 2)) (PAIRHT ’(:B :C) ’(3 4))) :satisfies (lambda (result) (equalp result (pairht ’(:a :b :c) ’(1 2 4)))) “‘
The FUNCTION shoud be ftype as (function (t t)) which accepts v1 and v2.

“‘lisp
#?(HT-UNION (PAIRHT ’(:A :B) ’(1 2)) (PAIRHT ’(:B :C) ’(3 4)) #’+) :satisfies (lambda (result) (equalp result (pairht ’(:a :b :c) ’(1 5 4)))) “‘
result := hash-table

## Affected By:
none.

## Side-Effects:
none.

## Notes:

## Exceptional-Situations:

Package

hash-table-ext

Source

hash-table-ext.lisp (file)

Function: left A B
Package

hash-table-ext

Source

hash-table-ext.lisp (file)

Function: map-hash-table FUNCTION HASH-TABLE

# MAP-HASH-TABLE

## Description:

### syntax (MAP-HASH-TABLE function hash-table)
=> result

## Arguments and Values:
function := function, otherwise signals implementation dependent condition.

“‘lisp
#?(MAP-HASH-TABLE "not-function" (MAKE-HASH-TABLE))
:signals CONDITION
“‘
FUNCTION should be the ftype as (function (t t)).
Return values are discarded.
hash-table := hash-table, otherwise signals implementation dependent condition.

“‘lisp
#?(MAP-HASH-TABLE #’LIST "not hash-table")
:signals CONDITION
“‘
result := hash-table, newly allocated.

“‘lisp
#?(MAP-HASH-TABLE (LAMBDA (K V) (DECLARE (IGNORE K)) (1+ V))
(PAIRHT ’(:A :B) ’(1 2)))
:satisfies (lambda (result)
(equalp result (pairht ’(:a :b) ’(2 3))))
“‘
The second argument ‘HASH-TABLE‘ never modified.

“‘lisp
#?(LET ((HT (PAIRHT ’(:A :B) ’(1 2))))
(MAP-HASH-TABLE (LAMBDA (K V) (DECLARE (IGNORE K)) (1+ V)) HT)
HT)
:satisfies (lambda (result)
(equalp result (pairht ’(:a :b) ’(1 2))))
“‘

## Affected By:
none

## Side-Effects:
none

## Notes:
MAP-HASH-TABLE returned new hash-table which has same keys with argument hash-table. And each values are set by return value of first argument FUNCTION.

“‘lisp
#?(let ((ht (pairht ’(:a) ’(0))))
(values (map-hash-table (lambda (k v)
(declare (ignore v))
(remhash k ht))
ht)
ht))
:multiple-value-satisfies (lambda (returned origin)
(& (equalp returned (pairht ’(:a) ’(t)))
(equalp origin (make-hash-table))))
“‘

## Exceptional-Situations:

Package

hash-table-ext

Source

hash-table-ext.lisp (file)

Function: mapht FUNCTION HASH-TABLE

# MAPHT

## Description:

### syntax (MAPHT function hash-table)
=> result

“‘lisp
#?(let (result)
(MAPHT (LAMBDA (&REST ARGS) (push ARGS result)) (PAIRHT ’(:A :B) ’(1 2))) result)
:satisfies (lambda (result) (null (set-exclusive-or result ’((:a 1) (:b 2)) :test #’equal))) “‘

## Arguments and Values:
function := function, otherwise signals implementation dependent condition.

“‘lisp
#?(MAPHT "not function" (MAKE-HASH-TABLE))
:signals CONDITION
“‘
FUNCTION should be the ftype as (function (t t)).
Return values are discarded.
hash-table := hash-table, otherwise signals implementation dependent condition.

“‘lisp
#?(MAPHT (LAMBDA (&REST ARGS) (PRINT ARGS)) "not hash-table")
:signals CONDITION
“‘
result := hash-table, the second argument.

“‘lisp
#?(MAPHT (LAMBDA (&REST ARGS) (PRINT ARGS)) (MAKE-HASH-TABLE))
:be-the HASH-TABLE
“‘

## Affected By:
none.

## Side-Effects:
none.

## Notes:
See [Traversal rules and side effect.](http://clhs.lisp.se/Body/03_f.htm)

“‘lisp
#?(let ((ht (pairht ’(:a) ’(1))))
(mapht (lambda (k v)
(declare (ignore v))
(remhash k ht))
ht))
:satisfies (lambda (result)
(equalp result (make-hash-table)))
“‘

## Exceptional-Situations:

Package

hash-table-ext

Source

hash-table-ext.lisp (file)

Function: nmapht FUNCTION HASH-TABLE

# NMAPHT

## Description:

### syntax (NMAPHT function hash-table)
=> result

## Arguments and Values:
function := function, otherwise signals implementation dependent condition.

“‘lisp
#?(NMAPHT "not function" (MAKE-HASH-TABLE))
:signals CONDITION
“‘
FUNCTION should be the ftype as (function (t t)).
Return values are discarded.
hash-table := hash-table, otherwise signals implementation dependent condition.

“‘lisp
#?(NMAPHT #’LIST "not hash-table")
:signals CONDITION
“‘
result := hash-table

“‘lisp
#?(LET ((HT (PAIRHT ’(:A :B) ’(1 2))))
(NMAPHT (LAMBDA (K V) (DECLARE (IGNORE K)) (1+ V)) HT))
:satisfies (lambda (result)
(equalp result (pairht ’(:a :b) ’(2 3))))
“‘

## Affected By:
none

## Side-Effects:
Destructively modify second argument.

“‘lisp
#?(LET ((HT (PAIRHT ’(:A :B) ’(1 2))))
(NMAPHT (LAMBDA (K V) (DECLARE (IGNORE K)) (1+ V)) HT)
HT)
:satisfies (lambda (result)
(equalp result (pairht ’(:a :b) ’(2 3))))
“‘

## Notes:
NMAPHT destructively update the second argument HASH-TABLE with returned value of the first argument FUNCTION.

“‘lisp
#?(let ((ht (pairht ’(:a) ’(1))))
(values (nmapht (lambda (k v)
(declare (ignore v))
(remhash k ht))
ht)
ht))
:multiple-value-satisfies (lambda (returned origin)
(& (eq returned origin)
(equalp returned (pairht ’(:a) ’(t)))))
“‘

## Exceptional-Situations:

Package

hash-table-ext

Source

hash-table-ext.lisp (file)

Function: pairht KEYS VALUES &optional HASH-TABLE

# PAIRHT

## Description:

### syntax (PAIRHT keys values &optional (hash-table (make-hash-table)))
=> result

## Arguments and Values:
keys := list, otherwise signal an implementation dependent condition.

“‘lisp
#?(PAIRHT :NOT-LIST NIL)
:signals CONDITION
“‘
values := list, otherwise signal an implementation dependent condition.

“‘lisp
#?(PAIRHT NIL "not list")
:signals CONDITION
“‘
hash-table := hash-table, otherwise signal an implementation dependent condition.

“‘lisp
#?(pairht nil nil "not hash-table")
:signals CONDITION
“‘
If not specified, new hash-table is returned.

“‘lisp
#?(PAIRHT NIL NIL)
:satisfies (lambda (result) (equalp result (make-hash-table)))
“‘
If specified, modified by new key value pairs.

“‘lisp
#?(PAIRHT ’(:A :B) ’(1 2) (PAIRHT ’(C) ’(3)))
:satisfies (lambda (result) (equalp result (pairht ’(:a :b c) ’(1 2 3))))
“‘

“‘lisp
#?(let ((ht (pairht ’(:a) ’(1))))
(pairht ’(:b) ’(2) ht)
(equalp ht (pairht ’(:a :b) ’(1 2))))
=> T
“‘
result := hash-table

“‘lisp
#?(PAIRHT ’(:A :B) ’(1 2))
:be-the HASH-TABLE
“‘

## Affected By:
none.

## Side-Effects:
Destructively modify optional argument HASH-TABLE.

“‘lisp
#?(let ((ht (pairht ’(:a) ’(1))))
(pairht ’(:a) ’(2) ht)
ht)
:satisfies (lambda (result) (equalp result (pairht ’(:a) ’(2))))
“‘

## Notes:

## Exceptional-Situations:
When keys and values are different length, an error is signaled.

“‘lisp
#?(PAIRHT ’(:A :B) ’(1 2 3))
:signals SIMPLE-ERROR
“‘

Package

hash-table-ext

Source

hash-table-ext.lisp (file)

Function: right A B
Package

hash-table-ext

Source

hash-table-ext.lisp (file)

Function: subht HASH-TABLE &rest KEYS

# SUBHT

## Description:

### syntax (SUBHT hash-table &rest keys)
=> result

## Arguments and Values:
hash-table := hash-table, otherwise signals implementation dependent condition.

“‘lisp
#?(SUBHT "not hash-table")
:signals CONDITION
“‘
keys := t
result := hash-table

“‘lisp
#?(SUBHT (PAIRHT ’(:A :B) ’(1 2)) :A)
:satisfies (lambda (result) (equalp result (pairht ’(:a) ’(1))))
“‘

“‘lisp
#?(SUBHT (PAIRHT ’(:A :B :C) ’(1 2 3)) :A :C)
:satisfies (lambda (result) (equalp result (pairht ’(:a :c) ’(1 3))))
“‘

## Affected By:
none.

## Side-Effects:
none.

## Notes:

## Exceptional-Situations:
When specified key is missing, an error is signaled.

“‘lisp
#?(SUBHT (PAIRHT ’(:A :B :C) ’(1 2 3)) :A :NO-SUCH-KEY)
:signals SIMPLE-ERROR
“‘

Package

hash-table-ext

Source

hash-table-ext.lisp (file)

Function: subhtp HT1 HT2

# SUBHTP

## Description:

### syntax (SUBHTP ht1 ht2)
=> result

## Arguments and Values:
ht1 := hash-table, otherwise signals implementation dependent condition.

“‘lisp
#?(SUBHTP "not hash-table" (MAKE-HASH-TABLE))
:signals CONDITION
“‘
ht2 := hash-table, otherwise signals implementation dependent condition.

“‘lisp
#?(SUBHTP (MAKE-HASH-TABLE) "not hash-table")
:signals CONDITION
“‘
result := boolean

“‘lisp
#?(SUBHTP (MAKE-HASH-TABLE) (MAKE-HASH-TABLE))
=> T
“‘

“‘lisp
#?(SUBHTP (PAIRHT ’(:A :B) ’(1 2)) (PAIRHT ’(:A :B) ’(3 4)))
=> T
“‘

“‘lisp
#?(SUBHTP (PAIRHT ’(:A :B) ’(1 2)) (PAIRHT ’(:A :B :C) ’(3 4 5)))
=> T
“‘

“‘lisp
#?(SUBHTP (PAIRHT ’(:A :B) ’(1 2)) (PAIRHT ’(:C :D) ’(3 4)))
=> NIL
“‘

“‘lisp
#?(SUBHTP (PAIRHT ’(:A :B) ’(1 2)) (PAIRHT ’(:B :C) ’(3 4)))
=> NIL
“‘

“‘lisp
#?(SUBHTP (PAIRHT ’(:A :B) ’(1 2)) (PAIRHT ’(:B) ’(3)))
=> NIL
“‘

## Affected By:
none.

## Side-Effects:
none.

## Notes:

## Exceptional-Situations:

Package

hash-table-ext

Source

hash-table-ext.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   H   L  
Index Entry  Section

F
File, Lisp, hash-table-ext.asd: The hash-table-ext․asd file
File, Lisp, hash-table-ext/hash-table-ext.lisp: The hash-table-ext/hash-table-ext․lisp file

H
hash-table-ext.asd: The hash-table-ext․asd file
hash-table-ext/hash-table-ext.lisp: The hash-table-ext/hash-table-ext․lisp file

L
Lisp File, hash-table-ext.asd: The hash-table-ext․asd file
Lisp File, hash-table-ext/hash-table-ext.lisp: The hash-table-ext/hash-table-ext․lisp file

Jump to:   F   H   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   C   D   F   H   L   M   N   P   R   S   W  
Index Entry  Section

C
copy-ht: Exported functions

D
doht: Exported macros

F
Function, copy-ht: Exported functions
Function, ht-adjoin: Exported functions
Function, ht-intersection: Exported functions
Function, ht-null: Exported functions
Function, ht-set-difference: Exported functions
Function, ht-set-exclusive-or: Exported functions
Function, ht-union: Exported functions
Function, left: Exported functions
Function, map-hash-table: Exported functions
Function, mapht: Exported functions
Function, nmapht: Exported functions
Function, pairht: Exported functions
Function, right: Exported functions
Function, subht: Exported functions
Function, subhtp: Exported functions

H
ht-adjoin: Exported functions
ht-intersection: Exported functions
ht-null: Exported functions
ht-set-difference: Exported functions
ht-set-exclusive-or: Exported functions
ht-union: Exported functions

L
left: Exported functions

M
Macro, doht: Exported macros
Macro, with-gethash: Exported macros
map-hash-table: Exported functions
mapht: Exported functions

N
nmapht: Exported functions

P
pairht: Exported functions

R
right: Exported functions

S
subht: Exported functions
subhtp: Exported functions

W
with-gethash: Exported macros

Jump to:   C   D   F   H   L   M   N   P   R   S   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables


Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   H   P   S  
Index Entry  Section

H
hash-table-ext: The hash-table-ext system
hash-table-ext: The hash-table-ext package

P
Package, hash-table-ext: The hash-table-ext package

S
System, hash-table-ext: The hash-table-ext system

Jump to:   H   P   S