🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.apl
Article #209

Re: APL structure

#209
From: Andrew Koenig
Date: Mon, 02 Jun 1986 15:33
25 lines
1236 bytes
>Could you explain what you mean by this?  What is "direct definition"?

Direct definition is where you type

	identifier: expression

and that defines a function named "identifier."  Any variables
assigned in the expression are made local.  Arguments are referred
to by the alpha and omega symbols for left and right arguments,
respectively.  For a monadic function you can use all alpha or all
omega.  So:

	SQRT:alpha*0.5

You can also write

	identifier: e1 : e2 : e3

where e1, e2, e3 are expressions.  This means the value of the function
is e1 unless e2 is true, in which case it's e3.  Thus:

	FACT: alpha x FACT alpha-1 : alpha=0 : 1

Note that colon is not a function -- it effectively has lower precedence
than function symbols.
Technical Details
Message-ID: <5575@alice.uUCp>
Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!caip!princeton!allegra!alice!ark
References: <1517@mmintl.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!caip!princeton!allegra!alice!ark
From: ark@alice.UucP (Andrew Koenig)
Newsgroups: net.lang.apl
Subject: Re: APL structure
Message-ID: <5575@alice.uUCp>
Date: Mon, 2-Jun-86 11:33:51 EDT
Article-I.D.: alice.5575
Posted: Mon Jun  2 11:33:51 1986
Date-Received: Wed, 4-Jun-86 07:33:59 EDT
References: <1517@mmintl.UUCP>
Organization: Bell Labs, Murray Hill
Lines: 25