Set consolidation: Difference between revisions

Content added Content deleted
(Add PL/M)
(Add APL)
Line 246: Line 246:
{A, B, C, D}
{A, B, C, D}
{A, B, C, D}, {F, G, H, I, K}</pre>
{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}}==
=={{header|AutoHotkey}}==