From: <tomas@tuxteam.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Lisp anime video
Date: Sun, 29 Aug 2021 14:06:27 +0200 [thread overview]
Message-ID: <20210829120627.GG18750@tuxteam.de> (raw)
In-Reply-To: <87h7f87c38.fsf@zoho.eu>
[-- Attachment #1: Type: text/plain, Size: 872 bytes --]
On Sun, Aug 29, 2021 at 12:57:15PM +0200, Emanuel Berg via Users list for the GNU Emacs text editor wrote:
> tomas wrote:
>
> >> ;; this file:
> >> ;; https://dataswamp.org/~incal/scheme/fac.scm
> >>
> >> (define (fac n)
> >> (if (> n 1)
> >> (* n (fac (- n 1)))
> >> 1) )
> >>
> >> (fac 10) ; 3 628 800
> >
> > That looks for me like a pretty reasonable value for (fac
> > 10). Actually, more reasonable that any other value?
>
> Yes, but I wrote that. In the video they show another piece of
> code which doesn't work in MIT/GNU Scheme what I can see.
So the difference is (1- n) vs (- n 1)? Why don't you say that,
instead of letting people find out?
Perhaps the function `1-' is just missing in "your" Scheme. You
can have it with
(def (1- n) (- n 1))
if you want :)
Note: Guile knows about `1-'.
Cheers
- t
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2021-08-29 12:06 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-29 5:28 Lisp anime video Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 5:30 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 5:43 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 7:40 ` tomas
2021-08-29 8:11 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 10:00 ` tomas
2021-08-29 10:57 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 12:06 ` tomas [this message]
2021-08-29 15:44 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 16:04 ` tomas
2021-08-29 16:10 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 11:01 ` Philip Kaludercic
2021-08-29 17:42 ` [External] : " Drew Adams
2021-08-29 17:44 ` Drew Adams
2021-08-30 22:59 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-31 2:14 ` Drew Adams
2021-09-04 10:45 ` Wayne Harris via Users list for the GNU Emacs text editor
2021-08-29 18:03 ` Philip Kaludercic
2021-08-29 18:05 ` Drew Adams
2021-08-30 0:19 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-30 11:57 ` Marcin Borkowski
2021-08-30 15:13 ` Colin Baxter
2021-08-29 17:42 ` Drew Adams
2021-09-04 10:49 ` Wayne Harris via Users list for the GNU Emacs text editor
2021-09-04 13:44 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-04 15:12 ` Wayne Harris via Users list for the GNU Emacs text editor
2021-09-04 22:55 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-05 0:13 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-05 1:20 ` [External] : " Drew Adams
2021-09-05 1:27 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-05 15:14 ` Drew Adams
2021-09-05 15:16 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-05 7:29 ` tomas
2021-09-05 14:46 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-05 15:05 ` tomas
2021-09-05 15:11 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-05 19:55 ` Arthur Miller
2021-09-05 21:02 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-06 5:08 ` Arthur Miller
2021-09-04 15:39 ` FW: [External] : " Drew Adams
2021-09-04 16:31 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-09-04 17:51 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-04 19:16 ` FW: " Drew Adams
2021-09-24 5:38 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-24 6:53 ` tomas
2021-09-24 7:30 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-24 16:39 ` Drew Adams
2021-09-24 17:03 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-24 18:44 ` Drew Adams
2021-08-29 8:14 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 8:25 ` Omar Polo
2021-09-04 10:52 ` Wayne Harris via Users list for the GNU Emacs text editor
2021-08-29 10:03 ` tomas
2021-08-29 15:07 ` Arthur Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210829120627.GG18750@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).