Set consolidation: Difference between revisions
Add APL
Not a robot (talk | contribs) (Add PL/M) |
Not a robot (talk | contribs) (Add APL) |
||
Line 246:
{A, B, C, D}
{A, B, C, D}, {F, G, H, I, K}</pre>
=={{header|APL}}==
<syntaxhighlight lang="apl">consolidate ← (⊢((⊂∘∪∘∊(/⍨)),(/⍨)∘~)(((⊃∘⍒+/)⊃↓)∘.(∨/∊)⍨))⍣≡</syntaxhighlight>
{{out}}
<syntaxhighlight lang="apl"> consolidate 'AB' 'CD'
AB CD
consolidate 'AB' 'BD'
ABD
consolidate 'AB' 'CD' 'DB'
ABCD
consolidate 'HIK' 'AB' 'CD' 'DB' 'FGH'
HIKFG ABCD </syntaxhighlight>
=={{header|AutoHotkey}}==
|