omc-list.lsp¶
Functions for manipulating lists and association lists.
Functions¶
(filter func lst)
Return a list of elements of lst for which func is not nil.
(acons key value alist)
Return a copy of the given association list with the key value pair added at the start.
(rassoc value alist)
Search an association list for the first key value pair with the given value and return it.
(alist-get key alist)
Return the value for the given key in an association list.
(alist-set omc-key omc-value omc-alist-symbol)
Sets the value for a key in the given association list. The alist argument must be quoted to be passed as a symbol. New items are placed at the end of the alist. If the key already exists in the alist, the value of its first occurrence is overwritten. If more than one item in the alist has the target key, only the items that have the same value as that of the first occurrence of key are replaced with the new value. Items with different values are left unchanged as per the behavior ofsubstcalled on the whole item. Returns the alist.
(add-to-list omc-list-symbol omc-element)
Adds the given element to the first position of the list if and only if it is not already in the list. The list argument must be quoted to be passed as a symbol. Returns the list. It has the same behavior as in emacs lisp but without the optional arguments
(add-to-tail omc-list-symbol omc-element)
Adds element to the last position of the list unconditionally. The list argument must be quoted to be passed as a symbol. Returns the list.
Global variables¶
first assigned in
- Top level
rest assigned in
- Top level
Functions called on load¶
- princ