Sum and product of an array: Difference between revisions

→‎{{header|APL}}: Added link to Extended Dyalog APL solution executable on-line
(→‎{{header|APL}}: Added a solution with the pair primitive function in dzaima/APL and Extended Dyalog APL)
(→‎{{header|APL}}: Added link to Extended Dyalog APL solution executable on-line)
Line 272:
What follows ⍝ is a comment and / is usually known as ''reduce'' in APL.
 
 
{{works with|dzaima/APL}}
using{{works the [https:with|dzaima//aplwiki.com/wiki/Pair pair (⍮)] primitive functionAPL}} ([https://tio.run/##SyzI0U2pSszMTfz//1Hf1EdtEzS09R/1rjs8XV/TUMFIwVjBRMH0/38A tryTry itIt onlineOnline])
{{works with|Extended Dyalog APL}}
{{works with|Extended Dyalog APL}} ([https://tio.run/##SyzI0U2pTMzJT9dNrShJzUtJTfn//1HfVIVHbRMUNLT1FR71rlM4PF1fU8FQwUjBWMFEwfT/fwA Try It Online])
using the [https://aplwiki.com/wiki/Pair pair (⍮)] primitive function ([https://tio.run/##SyzI0U2pSszMTfz//1Hf1EdtEzS09R/1rjs8XV/TUMFIwVjBRMH0/38A try it online])
using the [https://aplwiki.com/wiki/Pair pair (⍮)] primitive function
<lang apl> ⎕ ← (+/ ⍮ ×/) 1 2 3 4 5
15 120</lang>
Spaces are optional except as separators between array elements.
 
=={{header|AppleScript}}==
Anonymous user