Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

You will have a long and boring life.


comp / comp.lang.scheme / Re: callbacks in slot writer

SubjectAuthor
o Re: callbacks in slot writerB. Pym

1
Subject: Re: callbacks in slot writer
From: B. Pym
Newsgroups: comp.lang.lisp, comp.lang.scheme
Organization: A noiseless patient Spider
Date: Thu, 26 Sep 2024 14:30 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Nobody447095@here-nor-there.org (B. Pym)
Newsgroups: comp.lang.lisp,comp.lang.scheme
Subject: Re: callbacks in slot writer
Date: Thu, 26 Sep 2024 14:30:11 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <vd3r5i$7cr0$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Date: Thu, 26 Sep 2024 16:30:11 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="914530019d7c6307aba136b3f4454c87";
logging-data="242528"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18EM94th9wTvfNSl+yZSXcZ"
User-Agent: XanaNews/1.18.1.6
Cancel-Lock: sha1:JrgG2dCCHKpWAStXluswCv5gaFY=
View all headers

> (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)

1

rocksolid light 0.9.8
clearnet tor