Changes

Jump to navigation Jump to search

Readability

13 bytes added, 07:34, 27 September 2020
m
== Examples ==
=== Gilman & Rose ===
In [[Books#APL_.E2.80.95_An_Interactive_Approach|APL ― an An Interactive Approach]], the authors the authors describe the following code, which computes the correlation coefficient, as “almost pornographic”:<!--- Intentionally For the effect, this is intentionally not syntax coloured --->
:<code>r←(+/x×y)÷((+/(x←x-(+/x)÷⍴x)*2)×+/(y←y-(+/y)÷⍴y)*2)×.5</code>
By splitting the expression intro even a moderate number of pieces, a symmetry is revealed:
</source>
A new [[namespace]], with the original value of <source lang=apl inline>ns</source> as name, is created inside <source lang=apl inline>container</source> and the character representation <source lang=apl inline>'#.container.ns'</source> is returned from <source lang=apl inline>⎕NS</source> to <source lang=apl inline>⍎</source> which evaluates the name to a reference, that in turn replaces the previous value of <source lang=apl inline>ns</source>.
 
== See also ==
* [[Semantic density]]
* [[Function-operator overloading]]
{{APL syntax}}

Navigation menu