Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

History tends to exaggerate. -- Col. Green, "The Savage Curtain", stardate 5906.4


devel / comp.lang.lisp / .Re: Road to Clojure Survey 2.0

SubjectAuthor
o .Re: Road to Clojure Survey 2.0Robert L.

1
.Re: Road to Clojure Survey 2.0

<t14afe$1328$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!aioe.org!GE+8+L9ohIp2pD6PT3mH2Q.user.46.165.242.75.POSTED!not-for-mail
From: No_spamming@noWhere_7073.org (Robert L.)
Newsgroups: comp.lang.lisp
Subject: .Re: Road to Clojure Survey 2.0
Date: Sat, 19 Mar 2022 10:15:11 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <t14afe$1328$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Info: gioia.aioe.org; logging-data="35912"; posting-host="GE+8+L9ohIp2pD6PT3mH2Q.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. - Sat, 19 Mar 2022 10:15 UTC

> than version you've wrote in CL. i would write it like this:
>
> (defun factorial (n)
> (loop with p = 1
> for i from 1 to n
> do (setf p (* p i))
> finally (return p)))
>
> IMHO that's cleaner. or if i absolutely must use recursion:

Gauche Scheme (using lazy iota):

(define (fac n) (fold * 1 (liota n 1)))

(fac 6)
===>
720

(fac 5)
===>
120

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor