Unique characters in each string: Difference between revisions

m
(Added Quackery.)
m (→‎{{header|Wren}}: Minor tidy)
 
(4 intermediate revisions by 3 users not shown)
Line 313:
3 strings, 43 characters, 20 different, 6 unique: 123abc
</pre>
 
=={{header|BQN}}==
<syntaxhighlight lang="bqn">(∧∘(∊/⊣)´ (∊∧∊⌾⌽)⊸/¨) "1a3c52debeffd"‿"2b6178c97a938stf"‿"3ycxdb1fgxa2yz"</syntaxhighlight>
{{out}}
<pre>"123abc"</pre>
 
=={{header|Delphi}}==
Line 575 ⟶ 580:
{{Out}}
<pre>123abc</pre>
 
=={{header|J}}==
<syntaxhighlight lang="j"> /:~@> (e. # [)&.>/ (-. -.@~: # ])&.> '1a3c52debeffd';'2b6178c97a938stf';'3ycxdb1fgxa2yz'
threefounds echo$123abc</syntaxhighlight>
 
=={{header|JavaScript}}==
Line 979 ⟶ 988:
witheach [ countchars justones ]
2 times addnests
threesfound
threefounds echo$</syntaxhighlight>
witheach [ emit sp ]</syntaxhighlight>
 
{{out}}
 
<pre>123abc1 2 3 a b c </pre>
 
=={{header|Raku}}==
Line 1,089 ⟶ 1,099:
Found 6 unique characters in each string
done...
</pre>
 
=={{header|RPL}}==
{{works with|HP|48G}}
≪ → word char
≪ 0
1 word SIZE '''FOR''' j
word j DUP SUB char == +
'''NEXT'''
≫ ≫ '<span style="color:blue">OCCHAR</span>' STO
≪ "" → words char
≪ { } words 1 GET
1 OVER SIZE '''FOR''' j
DUP j DUP SUB 'char' STO
words 1 ≪ char <span style="color:blue">OCCHAR</span> ≫ DOLIST
'''IF''' ΠLIST 1 == '''THEN''' SWAP char + SWAP '''END'''
'''NEXT''' DROP SORT
≫ ≫ '<span style="color:blue">UNICHARS</span>' STO
 
{ "1a3c52debeffd" "2b6178c97a938stf" "3ycxdb1fgxa2yz" } <span style="color:blue">UNICHARS</span>
{{out}}
<pre>
1: { "1" "2" "3" "a" "b" "c" }
</pre>
 
Line 1,121 ⟶ 1,155:
{{libheader|Wren-seq}}
{{libheader|Wren-sort}}
<syntaxhighlight lang="ecmascriptwren">import "./seq" for Lst
import "./sort" for Sort
 
var strings = ["1a3c52debeffd", "2b6178c97a938stf", "3ycxdb1fgxa2yz"]
9,476

edits