Deutsch   English   Français   Italiano  
<vath1c$ltbf$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: "B. Pym" <Nobody447095@here-nor-there.org>
Newsgroups: comp.lang.lisp,comp.lang.scheme
Subject: Re: getting list of keys
Date: Fri, 30 Aug 2024 22:27:57 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <vath1c$ltbf$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Date: Sat, 31 Aug 2024 00:27:58 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c51450164ff44e4b4c9e62a2e4bb2981";
	logging-data="718191"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19CarP2I2QZSBLKEQpXlTRK"
User-Agent: XanaNews/1.18.1.6
Cancel-Lock: sha1:yYAbxlZsGbQjUc9OahSKoUPEJE4=
Bytes: 1467

> > an `update' function for the mp3 database.
> > I need a function for doing something like this with a list:
> >
> > * (xxxx (list :artist "something" :song "sss"))
> > => (:artist :song)
> >
> > Thanks in advance, and sorry for my bad english.
> > --
> > Pablo.
> 
> CL-USER> (loop :for (x y) :on (list :artist "something" :song "sss") :by #'cddr
>             :collect x)
> (:ARTIST :SONG)

Gauche Scheme and Racket using unfold from SRFI-1.

(use srfi-1)  ;; unfold for Gauche
  or
(require srfi/1)  ;; unfold for Racket

(unfold null? car cddr '(:artist "something" :song "sss"))
  ===>
(:artist :song)