14 ms·
You can make it simpler: l:0;.Q.fs[{if[x~l;:];-1 l::x}each]`:input or if you have memory: -1 distinct read0`:input ...or if you want to use k:
by geocar 9y ago
You can make it simpler:
l:0;.Q.fs[{if[x~l;:];-1 l::x}each]`:input
or if you have memory:
-1 distinct read0`:input
...or if you want to use k:
-1@?0:`:input