Maximum difference between adjacent elements of list: Difference between revisions
Maximum difference between adjacent elements of list (view source)
Revision as of 14:26, 19 July 2021
, 2 years agoAdd APL
(→{{header|Phix}}: added min/avg) |
Not a robot (talk | contribs) (Add APL) |
||
Line 161:
Max difference [ 776.591 ] is 0.000:
</pre>
=={{header|APL}}==
{{works with|Dyalog APL}}
<lang APL>maxdiff ← (⊢((⌈/⊢),⊣(⌿⍨)⊢=(⌈/⊢))(|-)/)∘(↑2,/⊢)</lang>
{{out}}
<pre> maxdiff 1 8 2 ¯3 0 1 1 ¯2.3 0 5.5 8 6 2 9 11 10 3
7 1 8
7 2 9
7 10 3</pre>
=={{header|Factor}}==
|