Article View: alt.folklore.computers
Article #623804Re: The dictionary definition of recursion
From: Andrew Swallow
Date: Tue, 05 Jun 2018 15:24
Date: Tue, 05 Jun 2018 15:24
31 lines
2749 bytes
2749 bytes
On 05/06/2018 15:42, Gareth's Downstairs Computer wrote: > On 05/06/2018 15:28, Andrew Swallow wrote: >> On 04/06/2018 17:16, Gareth's Downstairs Computer wrote: >>> Recursion : see recursion. >>> >>> As a recursive "elegant" solution, >>> >>> factorial (1,000,000) is likely to >>> crash most systems >> >> Factorial is a simple loop. >> >> 10 INPUT N >> 20 LET F = 1 >> 30 FOR I = 1 TO N >> 40 F = F * I >> 50 NEXT I >> 60 PRINT N,"! is ",F >> > > The discussion was not about iteration but the > claimed elegance of recursion. > > However, another iterative process where recursion is > unnecessary is the walking of trees; certainly a B Tree > where all are sorted, for you take the standard approach > of walking a maze (a maze with no internal doors!!!!!) of > always taking the leftmost branch, by always first going > for the lowest branch > Recursion is an inelegant form of iteration.
Technical Details
Message-ID:
<94udnWYucs-iNovGnZ2dnUU78TGdnZ2d@giganews.com>Path:
mbox-mo1.pugleaf.net!n13-v6ni5380wmc.0!nntp.google.com!goblin3!goblin1!goblin.stu.neva.ru!border1.nntp.ams1.giganews.com!nntp.giganews.com!buffer1.nntp.ams1.giganews.com!buffer2.nntp.ams1.giganews.com!news.giganews.com.POSTED!not-for-mailReferences:
<pf3oke$hq8$1@dont-email.me> <L9Sdnc69nM-WA4vGnZ2dnUU78RvNnZ2d@giganews.com> <pf67gs$fpm$1@dont-email.me>Show Full Headers
Complete Article Headers
X-Received: by 2002:a1c:7614:: with SMTP id r20-v6mr2048211wmc.26.1528212288564; Tue, 05 Jun 2018 08:24:48 -0700 (PDT) X-BeenThere: alt.folklore.computers@googlegroups.com Received: by 2002:a1c:864a:: with SMTP id i71-v6ls731045wmd.11.gmail; Tue, 05 Jun 2018 08:24:47 -0700 (PDT) X-Received: by 2002:a1c:8bca:: with SMTP id n193-v6mr620093wmd.11.1528212287769; Tue, 05 Jun 2018 08:24:47 -0700 (PDT) Path: mbox-mo1.pugleaf.net!n13-v6ni5380wmc.0!nntp.google.com!goblin3!goblin1!goblin.stu.neva.ru!border1.nntp.ams1.giganews.com!nntp.giganews.com!buffer1.nntp.ams1.giganews.com!buffer2.nntp.ams1.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 05 Jun 2018 10:24:47 -0500 Subject: Re: The dictionary definition of recursion Newsgroups: alt.folklore.computers References: <pf3oke$hq8$1@dont-email.me> <L9Sdnc69nM-WA4vGnZ2dnUU78RvNnZ2d@giganews.com> <pf67gs$fpm$1@dont-email.me> From: Andrew Swallow <am.sw...@btinternet.com> Date: Tue, 5 Jun 2018 16:24:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <pf67gs$fpm$1@dont-email.me> Message-ID: <94udnWYucs-iNovGnZ2dnUU78TGdnZ2d@giganews.com> Lines: 31 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-zvt4Vk1IF52w/NuK7G6o7iTOj0AY2nBHPODB+6d01LSCuezU6nDMKVighKStLhZeIgPWo2QbuiGcTIu!4P8n1DCOPsXT5K3hOkO2+8vOneG1jc5hb02GreVB9FsiqtQNff8qtblbuCpotlKbDjnDHi7Bh+c= X-Complaints-To: ab...@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2203 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit