Compare commits
No commits in common. "fdbda3672fd7530d347575618ec4c349b9f81401" and "ddc3add769abf78ce5c8a781caf34d18f99fe77b" have entirely different histories.
fdbda3672f
...
ddc3add769
|
@ -280,8 +280,7 @@ into one. Otherwise, parse it into an associative list."
|
|||
;;; ————————————————————————————————————————
|
||||
;; Note-worthy: See the above-defined DEFINE-YASON-ENCODE-SLOTS.
|
||||
(defmethod yason:encode ((obj object) &optional (stream *standard-output*))
|
||||
(yason:with-output (stream)
|
||||
(yason:encode-object obj)))
|
||||
(yason:encode-object obj))
|
||||
|
||||
(defmethod yason:encode-object ((obj object))
|
||||
(typecase *@context*
|
||||
|
@ -302,6 +301,8 @@ into one. Otherwise, parse it into an associative list."
|
|||
their sanitized string keys appropriate for ActivityVocabular custom.
|
||||
A class with slots MAP-AWAY and COLLECTION-AGAIN would return
|
||||
((MAP-AWAY . “mapAway”)(COLLECTION-AGAIN . “collectionAgain”))"
|
||||
;; (alist-remove-keys
|
||||
;; 'type
|
||||
(alist-mapcdr #'camel-case
|
||||
(class-slots-alist class)))
|
||||
|
||||
|
@ -355,6 +356,12 @@ items in each will be contained in the resultant list."
|
|||
(mapcar (lambda (sym) (find-class sym))
|
||||
(find-registered-symbols str)))
|
||||
|
||||
(defun alist-remove-keys (item alist &optional (test #'equal))
|
||||
"Remove cells from an associative list whose key TESTs as ITEM."
|
||||
(cl:remove item alist
|
||||
:test (lambda (a cell)
|
||||
(funcall test a (car cell)))))
|
||||
|
||||
(defun alist-mapcdr (function alist)
|
||||
"Apply a FUNCTION to all values (cdrs) of an ALIST’s pairs. Returns a new ALIST
|
||||
of the same keys, whose values are the results of FUNCTION."
|
||||
|
|
Ŝarĝante…
Reference in New Issue