help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [External] : Re: How to make M-x TAB not work on (interactive) decla


From: Jean Louis
Subject: Re: [External] : Re: How to make M-x TAB not work on (interactive) declaration?
Date: Mon, 16 Jan 2023 13:10:59 +0300
User-agent: Mutt/2.2.9+54 (af2080d) (2022-11-21)

* tomas@tuxteam.de <tomas@tuxteam.de> [2023-01-16 09:11]:
> Identity element [0] as defined in group theory [1].
> 
> The association of 0 with + and 1 with * runs deeper in maths
> than you think.
> 
> > Though that it is so, it does not answer why is it so.
> 
> Those are, of course, conventions. As whether the natural
> numbers begin with 0 or 1. But the above is, AFAIK, most
> widespread among mathematicians, wheter the latter is not.

Thanks. 

I could see reference that identity element is the one that would not
change the other elements if the operation would be applied.

This alone makes sense.

But it does not make sense why somebody have put it in Lisp. Do you
know? 

I did not find any references by using Duckduckgo.

(*) ➜ 1
(+) ➜ 0
(/) Wrong number of arguments: /
(-) ➜ 0

The question why is not yet clear to me. Why is it in Lisp so?

Why not then for `/' as well? Is it not possible?

What is practical use of teaching functions to spit it identity
element instead of doing "wrong number of arguments" just as for
division?

It is not explained in Emacs Lisp manual.

If function `*' should without arguments return identity element by
mathematical terminology, that is not explained. 

Then I see in Guile:

(*) ➜ 1
(-) Wrong number of arguments to -
(+) ➜ 0
(/) Wrong number of arguments to /

CLISP:

(-) EVAL: too few arguments given to -: (-)
(*) ➜ 1
(+) ➜ 0

Why Emacs Lisp returns 0 for (-) and CLISP and Guile not?

Finally, what is the actual use of it?


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]