Two sum: Difference between revisions
Content added Content deleted
m (→{{header|Wren}}: Changed to Wren S/H) |
(Added Uiua) |
||
Line 2,950: | Line 2,950: | ||
1 | 2 4 | |
1 | 2 4 | |
||
+---------+</syntaxhighlight> |
+---------+</syntaxhighlight> |
||
=={{header|Uiua}}== |
|||
Works by using ⊞f. to form a cross product (similar to APL's ∘.f⍨). |
|||
The resulting additions are multiplied with a mask of the upper right half (⊞>.⇡⧻) to remove extraneous answers. |
|||
<syntaxhighlight lang="uiua">f ← ⊚=×⊞>.⇡⧻.⊞+. |
|||
f 0_2_11_19_90 21</syntaxhighlight> |
|||
{{out}} |
|||
<pre>╭─ |
|||
╷ 1 3 |
|||
╯</pre> |
|||
=={{header|Vala}}== |
=={{header|Vala}}== |