Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the assoc-utils Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 03:13:34 2022 GMT+0.
Next: Systems, Previous: The assoc-utils Reference Manual, Up: The assoc-utils Reference Manual [Contents][Index]
Utilities for manipulating association lists.
(defvar *person*
'(("name" . "Eitaro") ("email" . "e.arrows@gmail.com")))
(aget *person* "name")
;=> "Eitaro"
(aget *person* "address")
;=> NIL
(aget *person* "address" "Tokyo, Japan")
;=> "Tokyo, Japan"
(setf (aget *person* "name") "Eitaro Fukamachi")
*person*
;=> (("name" . "Eitaro Fukamachi") ("email" . "e.arrows@gmail.com"))
(defvar *person*
'(("name" . "Eitaro") ("email" . "e.arrows@gmail.com")))
(remove-from-alist *person* "name")
;=> (("email" . "e.arrows@gmail.com"))
;; Destructive version
(delete-from-alist *person* "name")
;=> (("email" . "e.arrows@gmail.com"))
(defvar *person*
'(("name" . "Eitaro") ("email" . "e.arrows@gmail.com")))
(alist-plist *person*)
;=> (:NAME "Eitaro" :EMAIL "e.arrows@gmail.com")
(plist-alist '(:name "Eitaro" :email "e.arrows@gmail.com"))
;=> (("name" . "Eitaro") ("email" . "e.arrows@gmail.com"))
(defvar *person*
'(("name" . "Eitaro") ("email" . "e.arrows@gmail.com")))
(alist-hash *person*)
;=> #<HASH-TABLE :TEST EQUAL :COUNT 2 {1004329443}>
(hash-alist *)
;=> (("name" . "Eitaro") ("email" . "e.arrows@gmail.com"))
(defvar *person*
'(("name" . "Eitaro") ("email" . "e.arrows@gmail.com")))
(alist-keys *person*)
;=> ("name" "email")
(alist-values *person*)
;=> ("Eitaro" "e.arrows@gmail.com")
(alistp '(("name" . "Eitaro") ("email" . "e.arrows@gmail.com")))
;=> T
(alistp 1)
;=> NIL
(alistp nil)
;=> T
;; Type: alist is also available
(typep '(("name" . "Eitaro") ("email" . "e.arrows@gmail.com")) 'alist)
;=> T
(alist= '(("name" . "Eitaro") ("email" . "e.arrows@gmail.com"))
'(("email" . "e.arrows@gmail.com") ("name" . "Eitaro")))
;=> T
(ql:quickload :assoc-utils)
Assoc-Utils is free and unencumbered software released into the public domain.
Next: Modules, Previous: Introduction, Up: The assoc-utils Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
Utilities for manipulating association lists
Eitaro Fukamachi
Public Domain
# Assoc-Utils
[](https://travis-ci.org/fukamachi/assoc-utils)
[](https://coveralls.io/r/fukamachi/assoc-utils)
[](http://quickdocs.org/assoc-utils/)
Utilities for manipulating association lists.
## Usage
### aget
“‘common-lisp
(defvar *person*
’(("name" . "Eitaro") ("email" . "e.arrows@gmail.com")))
(aget *person* "name")
;=> "Eitaro"
(aget *person* "address")
;=> NIL
(aget *person* "address" "Tokyo, Japan")
;=> "Tokyo, Japan"
(setf (aget *person* "name") "Eitaro Fukamachi")
*person*
;=> (("name" . "Eitaro Fukamachi") ("email" . "e.arrows@gmail.com"))
“‘
### remove-from-alist & delete-from-alist
“‘common-lisp
(defvar *person*
’(("name" . "Eitaro") ("email" . "e.arrows@gmail.com")))
(remove-from-alist *person* "name")
;=> (("email" . "e.arrows@gmail.com"))
;; Destructive version
(delete-from-alist *person* "name")
;=> (("email" . "e.arrows@gmail.com"))
“‘
### alist-plist & plist-alist
“‘common-lisp
(defvar *person*
’(("name" . "Eitaro") ("email" . "e.arrows@gmail.com")))
(alist-plist *person*)
;=> (:NAME "Eitaro" :EMAIL "e.arrows@gmail.com")
(plist-alist ’(:name "Eitaro" :email "e.arrows@gmail.com"))
;=> (("name" . "Eitaro") ("email" . "e.arrows@gmail.com"))
“‘
### alist-hash & hash-alist
“‘common-lisp
(defvar *person*
’(("name" . "Eitaro") ("email" . "e.arrows@gmail.com")))
(alist-hash *person*)
;=> #<HASH-TABLE :TEST EQUAL :COUNT 2 {1004329443}>
(hash-alist *)
;=> (("name" . "Eitaro") ("email" . "e.arrows@gmail.com"))
“‘
### alist-keys & alist-values
“‘common-lisp
(defvar *person*
’(("name" . "Eitaro") ("email" . "e.arrows@gmail.com")))
(alist-keys *person*)
;=> ("name" "email")
(alist-values *person*)
;=> ("Eitaro" "e.arrows@gmail.com")
“‘
### alistp
“‘common-lisp
(alistp ’(("name" . "Eitaro") ("email" . "e.arrows@gmail.com")))
;=> T
(alistp 1)
;=> NIL
(alistp nil)
;=> T
;; Type: alist is also available
(typep ’(("name" . "Eitaro") ("email" . "e.arrows@gmail.com")) ’alist)
;=> T
“‘
### alist=
“‘common-lisp
(alist= ’(("name" . "Eitaro") ("email" . "e.arrows@gmail.com"))
’(("email" . "e.arrows@gmail.com") ("name" . "Eitaro")))
;=> T
“‘
## Installation
“‘common-lisp
(ql:quickload :assoc-utils)
“‘
## Author
* Eitaro Fukamachi (e.arrows@gmail.com)
## License
Assoc-Utils is free and unencumbered software released into the public domain.
0.1
src (module).
Next: Files, Previous: Systems, Up: The assoc-utils Reference Manual [Contents][Index]
Modules are listed depth-first from the system components tree.
assoc-utils (system).
assoc-utils.lisp (file).
Next: Packages, Previous: Modules, Up: The assoc-utils Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: assoc-utils/src/assoc-utils.lisp, Previous: Lisp, Up: Lisp [Contents][Index]
assoc-utils (system).
Previous: assoc-utils/assoc-utils.asd, Up: Lisp [Contents][Index]
src (module).
%aput (function).
Next: Definitions, Previous: Files, Up: The assoc-utils Reference Manual [Contents][Index]
Packages are listed by definition order.
Next: assoc-utils, Previous: Packages, Up: Packages [Contents][Index]
Previous: assoc-utils-asd, Up: Packages [Contents][Index]
common-lisp.
%aput (function).
Next: Indexes, Previous: Packages, Up: The assoc-utils Reference Manual [Contents][Index]
Definitions are sorted by export status, category, package, and then by lexicographic order.
Next: Internals, Previous: Definitions, Up: Definitions [Contents][Index]
Next: Macros, Previous: Public Interface, Up: Public Interface [Contents][Index]
Next: Ordinary functions, Previous: Special variables, Up: Public Interface [Contents][Index]
Next: Types, Previous: Macros, Up: Public Interface [Contents][Index]
Previous: Ordinary functions, Up: Public Interface [Contents][Index]
Previous: Public Interface, Up: Definitions [Contents][Index]
Previous: Definitions, Up: The assoc-utils Reference Manual [Contents][Index]
Jump to: | %
(
A D F H M P R S |
---|
Jump to: | %
(
A D F H M P R S |
---|
Next: Data types, Previous: Functions, Up: Indexes [Contents][Index]
Jump to: | *
S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
* | |||
*assoc-test* : | Public special variables | ||
| |||
S | |||
Special Variable, *assoc-test* : | Public special variables | ||
|
Jump to: | *
S |
---|
Jump to: | A F M P S T |
---|
Jump to: | A F M P S T |
---|