diff options
| author | 2021-07-16 18:43:46 +0300 | |
|---|---|---|
| committer | 2021-07-16 18:43:46 +0300 | |
| commit | daba579d990e5320ab731ba0a3837d8f3c2d58bf (patch) | |
| tree | c0da4622aa060c08546fab2fb4c8c056646a959a /dictionaries.sld | |
| parent | formatting (diff) | |
add makefile for testing; test with more implementations; move library to .sld; fix srfi-125 pop!
Diffstat (limited to 'dictionaries.sld')
| -rw-r--r--[l---------] | dictionaries.sld | 66 |
1 files changed, 65 insertions, 1 deletions
diff --git a/dictionaries.sld b/dictionaries.sld index 3dfc689..e6c9b8d 120000..100644 --- a/dictionaries.sld +++ b/dictionaries.sld @@ -1 +1,65 @@ -dictionaries.scm
\ No newline at end of file +(define-library + (dictionaries) + (import (scheme base) + (scheme case-lambda) + (srfi 1)) + + (cond-expand + (kawa (import (srfi 69 basic-hash-tables))) + (guile (import (srfi srfi-69))) + ((library (srfi 69)) (import (srfi 69))) + (else)) + + (cond-expand + (guile) + ((library (srfi 125)) (import (srfi 125))) + (else)) + + (cond-expand + (guile) + ((library (srfi 126)) (import (srfi 126))) + (else)) + + (export + + ;; predicates + dictionary? + dict-empty? + dict-contains? + + ;; lookup + dict-ref + dict-ref/default + + ;; mutation + dict-set! + dict-adjoin! + dict-delete! + dict-delete-all! + dict-replace! + dict-intern! + dict-update! + dict-update/default! + dict-pop! + dict-map! + dict-filter! + dict-remove! + dict-search! + + ;; whole dictionary + dict-size + dict-for-each + dict-count + dict-any + dict-every + dict-keys + dict-values + dict-entries + dict-fold + dict-map->list + dict->alist + + ;; registering dictionary types + register-dictionary!) + + (include "dictionaries-impl.scm")) |
