Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
|||
(put 'A 'foo 5)
|
||||
(put 'A 'bar 10)
|
||||
(put 'A 'baz 15)
|
||||
|
||||
: (getl 'A) # Get the whole property list
|
||||
-> ((15 . baz) (10 . bar) (5 . foo))
|
||||
|
||||
: (mapcar cdr (getl 'A)) # Get all keys
|
||||
-> (baz bar foo)
|
||||
|
||||
: (mapcar car (getl 'A)) # Get all values
|
||||
-> (15 10 5)
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
(idx 'A (def "foo" 5) T)
|
||||
(idx 'A (def "bar" 10) T)
|
||||
(idx 'A (def "baz" 15) T)
|
||||
|
||||
: A # Get the whole tree
|
||||
-> ("foo" ("bar" NIL "baz"))
|
||||
|
||||
: (idx 'A) # Get all keys
|
||||
-> ("bar" "baz" "foo")
|
||||
|
||||
: (mapcar val (idx 'A)) # Get all values
|
||||
-> (10 15 5)
|
||||
Loading…
Add table
Add a link
Reference in a new issue