From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Van L Newsgroups: gmane.emacs.help Subject: Re: Understanding dotimes skipping by 2 Date: Fri, 28 Sep 2018 19:50:12 +1000 Message-ID: <0011E5D8-A8DD-4829-AB06-502E14122CF7@scratch.space> References: <20180927224840.GA2161@mail.akwebsoft.com> <87efdem1fx.fsf@phil.uni-goettingen.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1538128127 21322 195.159.176.226 (28 Sep 2018 09:48:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 28 Sep 2018 09:48:47 +0000 (UTC) To: Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 28 11:48:43 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5pO7-0005RH-3B for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Sep 2018 11:48:43 +0200 Original-Received: from localhost ([::1]:42443 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5pQD-0007Is-HZ for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Sep 2018 05:50:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5pPl-0007Il-JQ for Help-gnu-emacs@gnu.org; Fri, 28 Sep 2018 05:50:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g5pPh-0008GS-KM for Help-gnu-emacs@gnu.org; Fri, 28 Sep 2018 05:50:25 -0400 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:33215) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g5pPg-00084f-P1 for Help-gnu-emacs@gnu.org; Fri, 28 Sep 2018 05:50:21 -0400 X-Originating-IP: 220.244.158.222 Original-Received: from epi.local (220-244-158-222.tpgi.com.au [220.244.158.222]) (Authenticated sender: van@scratch.space) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id F0A4D24001D for ; Fri, 28 Sep 2018 09:50:16 +0000 (UTC) In-Reply-To: <87efdem1fx.fsf@phil.uni-goettingen.de> X-Mailer: Apple Mail (2.3124) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.70.183.193 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:118049 Archived-At: > - Note also the use of `(1+ x)' instead of (+ x 1). Though honestly I = don't know what the difference really is. It's just the idiom I'm used = to. The 1+ syntactic sugar seems to cost performance by needing more lines = of code and it is less general in power to process the argument list if = it were to be extended like (+ x 1 2 3). There is no '(+1 x)' = implemented in src/data.c Could 1+ be an infix plus operator crutch? =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 1 DEFUN ("1+", Fadd1, Sadd1, 1, 1, 0, =E2=94=82 2 doc: /* Return NUMBER plus one. NUMBER may be a = number or a marker. =E2=94=82 3 Markers are converted to integers. */) =E2=94=82 4 (register Lisp_Object number) =E2=94=82 5 { =E2=94=82 6 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number); =E2=94=82 7 =20 =E2=94=82 8 if (FLOATP (number)) =E2=94=82 9 return (make_float (1.0 + XFLOAT_DATA (number))); =E2=94=82 10 =20 =E2=94=82 11 XSETINT (number, XINT (number) + 1); =E2=94=82 12 return number; =E2=94=82 13 } =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 1 DEFUN ("+", Fplus, Splus, 0, MANY, 0, =E2=94=82 2 doc: /* Return sum of any number of arguments, = which are numbers or markers. =E2=94=82 3 usage: (+ &rest NUMBERS-OR-MARKERS) */) =E2=94=82 4 (ptrdiff_t nargs, Lisp_Object *args) =E2=94=82 5 { =E2=94=82 6 return arith_driver (Aadd, nargs, args); =E2=94=82 7 } =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80