home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.apl
- Path: sparky!uunet!gatech!purdue!mentor.cc.purdue.edu!mentor!weg
- From: weg@mace.cc.purdue.edu (Eythan Weg)
- Subject: Re: $: (self-reference) difficulties
- In-Reply-To: abalje47@ursa.calvin.edu's message of Mon, 25 Jan 1993 01:32:23 GMT
- Message-ID: <WEG.93Jan25115650@mace.cc.purdue.edu>
- Sender: news@mentor.cc.purdue.edu (USENET News)
- Organization: Purdue University
- References: <abalje47.727925543@ursa>
- Date: Mon, 25 Jan 1993 16:56:50 GMT
- Lines: 20
-
- In article <abalje47.727925543@ursa> abalje47@ursa.calvin.edu (Alan Baljeu) writes:
-
- NB. The following four lines were copied (cut and paste) from
- NB. tut19.js which I got at watserv1.waterloo.edu from the file
- NB. /languages/apl/j/tutorial.tar. It was placed there in March,
- NB. while the executable arrived in October '92
-
- a=. '$.=. 2-0=y.' ; '1'
- b=. 'y. * $: y.-1'
- factorial=. (a,<b) : ''
- factorial 5
- limit error
- [2] y. * $: y.-1
-
- The manual (version 5) says that $: means essentially the phrase in
- which it occurs. For anything to behave properly there should be a
- way out of the resulting self reference (recursion). Hence the limit
- error.
-
- Eythan
-