Re: callbacks in slot writer

Liste des GroupesRevenir à cl scheme 
Sujet : Re: callbacks in slot writer
De : Nobody447095 (at) *nospam* here-nor-there.org (B. Pym)
Groupes : comp.lang.lisp comp.lang.scheme
Date : 26. Sep 2024, 15:30:11
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vd3r5i$7cr0$1@dont-email.me>
User-Agent : XanaNews/1.18.1.6
  (defun sans (plist &rest keys)
    "Returns PLIST with keyword arguments from KEYS removed."
    ;; stolen from Usenet posting <3247672165664225@naggum.no> by
    ;; Erik Naggum
    (let ((sans ()))
      (loop
        (let ((tail (nth-value 2 (get-properties plist keys))))
          ;; this is how it ends
          (unless tail
            (return (nreconc sans plist)))
          ;; copy all the unmatched keys
          (loop until (eq plist tail) do
                (push (pop plist) sans)
                (push (pop plist) sans))
          ;; skip the matched key
          (setq plist (cddr plist))))))

Gauche Scheme:

(delete-keywords '(b d) '(a 0 b 1 c 2 d 3))

 ===>
(a 0 c 2)

Date Sujet#  Auteur
26 Sep 24 o Re: callbacks in slot writer1B. Pym

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal