[Jprogramming] Verb Sequence or Ranking problem?

Raul Miller rauldmiller at gmail.com
Thu Sep 18 23:19:36 HKT 2008


On Thu, Sep 18, 2008 at 10:38 AM, Alex Rufon <alex_rufon at ist-systems.com> wrote:
>   [a=: 1 1 2 2 3 5 5 5
> 1 1 2 2 3 5 5 5
>   [b=: 3 4 5 5 3 1 2
> 3 4 5 5 3 1 2
>
> What I wanted to do was count the number of matching numbers in a that
> are in b. So potentially, my result should be:
> 1 0 3 3 1 2 2

   +/a=/b
1 0 3 3 1 2 2

If the storage costs of that approach are too excessive, you could
instead use:
   a +/@:="1 0 b
1 0 3 3 1 2 2

If either mechanism is not obvious to you (after you review your knowledge
of what the symbols mean), please ask, and I would be happy to
elaborate.

Thanks,

-- 
Raul


More information about the Programming mailing list