Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"When the going gets weird, the weird turn pro..." -- Hunter S. Thompson


devel / comp.lang.lisp / .Re: ANSI Common Lisp, page 57, item 5

SubjectAuthor
o .Re: ANSI Common Lisp, page 57, item 5Robert L.

1
.Re: ANSI Common Lisp, page 57, item 5

<svrg9l$ocu$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!aioe.org!5nyZhpkiNfgu6UGE4qaSHw.user.46.165.242.75.POSTED!not-for-mail
From: No_spamming@noWhere_7073.org (Robert L.)
Newsgroups: comp.lang.lisp
Subject: .Re: ANSI Common Lisp, page 57, item 5
Date: Thu, 3 Mar 2022 22:43:03 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <svrg9l$ocu$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Info: gioia.aioe.org; logging-data="24990"; posting-host="5nyZhpkiNfgu6UGE4qaSHw.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. - Thu, 3 Mar 2022 22:43 UTC

Kaz Kylheku wrote:

> On 2016-09-07, Dimitri Fontaine <dim@tapoueh.org> wrote:
> > Steve Graham <solitary.wanderer52@gmail.com> writes:
> >> ;; ANSI Common Lisp, page 57, item 5
> >> ;; Suppose the function pos+ takes a list and returns a list of each element
> >> ;; plus its position:
> >> ;;
> >> ;; > (pos+ '(7 5 1 4))
> >> ;; (7 6 3 7)
> >
> > CL-USER> (loop for i in '(7 5 1 4) for pos from 0 collect (+ pos i))
> > (7 6 3 7)
>
> $ txr -i
> 1> [mapcar + '(7 5 1 4) (range 0)]
> (7 6 3 7)

Shorter in Gauche Scheme:

(use gauche.sequence)

(map-with-index + '(7 5 1 4))

===>
(7 6 3 7)


devel / comp.lang.lisp / .Re: ANSI Common Lisp, page 57, item 5

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor