Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

[FORTRAN] will persist for some time -- probably for at least the next decade. -- T. Cheatham


devel / comp.lang.lisp / .re: Please help

SubjectAuthor
o .re: Please helpRobert L.

1
.re: Please help

<t04j63$1ien$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16950&group=comp.lang.lisp#16950

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!aioe.org!vBtjmgw8d33gtod2lZwILA.user.46.165.242.75.POSTED!not-for-mail
From: No_spamming@noWhere_7073.org (Robert L.)
Newsgroups: comp.lang.lisp
Subject: .re: Please help
Date: Mon, 7 Mar 2022 09:27:35 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <t04j63$1ien$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Info: gioia.aioe.org; logging-data="51671"; posting-host="vBtjmgw8d33gtod2lZwILA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: XanaNews/1.18.1.6
X-Notice: Filtered by postfilter v. 0.9.2
 by: Robert L. - Mon, 7 Mar 2022 09:27 UTC

"Private Oracle" wrote:

> I'm new to LISP and I've got a real bugger of
> a problem here : I need to define a function
> which duplicates every occurance of a given
> element in a given list. Suppose this funtion
> was called DUPLIC8, then the call
>
> (DUPLIC8 '(A B C D E B) 'B))
>
> should produce (A B B C D E B B).

Gauche Scheme or Racket:

(define (duplic8 items which)
(append-map
(lambda (x)
(if (equal? x which)
(list x x)
(list x)))
items))

(duplic8 '(a b c b) 'b)
===>
(a b b c b b)


devel / comp.lang.lisp / .re: Please help

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor