Hacker News new | ask | show | jobs
by geocar 3000 days 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
1 comments

Stupid question: With -1, how would I suppress the return value? Use a function?

   k)a:{-1@?0:`:input;};a[]
It's not a stupid question.

    ;
What this does is return generic-null :: which .Q.s doesn't print.