; (/: /:~ ;@(<@i.@#/.~)) 1 2 1 1 2{ 0 3 1
> 2 0 0 1 1
>
>
> R.E. Boss
>
>
>> -Original Message-
>> From: Programming On
>> Behalf Of Raul Miller
>> Sent: woensdag 28 maart 2018 22:02
>> To: Programming forum
>> Subject: Re: [J
No:
(/: /:~ ;@(<@i.@#/.~)) 1 2 1 1 2{ 0 3 1
2 0 0 1 1
R.E. Boss
> -Original Message-
> From: Programming On
> Behalf Of Raul Miller
> Sent: woensdag 28 maart 2018 22:02
> To: Programming forum
> Subject: Re: [Jprogramming] running count
>
> T
55
> To: programm...@jsoftware.com
> Subject: Re: [Jprogramming] running count
>
> Hiya,
>
>rc=: i.~ (] - {) /:@/:
>rc 1 2 1 1 2
> 0 0 1 2 1
>
> Cheers,
> Louis
>
> > On 28 Mar 2018, at 20:32, Joe Bogner wrote:
> >
> > I think this is
Hiya,
rc=: i.~ (] - {) /:@/:
rc 1 2 1 1 2
0 0 1 2 1
Cheers,
Louis
> On 28 Mar 2018, at 20:32, Joe Bogner wrote:
>
> I think this is an easy one but it's escaping me. How to calculate a
> running count of an item in a list?
>
> runct (1,2,1,1,2) -: 0,0,1,2,1
> runct (5,6,5,5,6) -: 0,0,1,
Hey all,
I came up with this version:
<:@(i.~ {"0 1 +/\@|:@=) 1 2 1 1 2
Best regards,
Jan-Pieter
On Wed, 28 Mar 2018, 22:02 Raul Miller, wrote:
> This?
>
>(/: /:~ ;@(<@i.@#/.~))1 2 1 1 2
> 0 0 1 2 1
>
> --
> Raul
>
>
> On Wed, Mar 28, 2018 at 2:32 PM, Joe Bogner wrote:
> > I think this is
This?
(/: /:~ ;@(<@i.@#/.~))1 2 1 1 2
0 0 1 2 1
--
Raul
On Wed, Mar 28, 2018 at 2:32 PM, Joe Bogner wrote:
> I think this is an easy one but it's escaping me. How to calculate a
> running count of an item in a list?
>
> runct (1,2,1,1,2) -: 0,0,1,2,1
> runct (5,6,5,5,6) -: 0,0,1,2,1
>
> Th
Chris - thank you again, looks good.
Henry - I started there but got stuck (should've mentioned it). I
skimmed though it and was trying to apply pi to the problem, which
clearly didn't work. It looks like oc is what I needed. Upon a
re-read, "oc" or "occurrence count" is exactly what I'm looking f
See also
http://code.jsoftware.com/wiki/Essays/Progressive_Index-Of
Henry Rich
On 3/28/2018 3:14 PM, chris burke wrote:
Following up your good start:
a ,: <: +/ (* +/\"1) = a=: 1 2 1 1 2 3 2 3
1 2 1 1 2 3 2 3
0 0 1 2 1 0 2 1
a ,: <: +/ (* +/\"1) = a=: 5 6 5 5 6 5 7 6
5 6 5 5 6 5 7 6
0 0
Following up your good start:
a ,: <: +/ (* +/\"1) = a=: 1 2 1 1 2 3 2 3
1 2 1 1 2 3 2 3
0 0 1 2 1 0 2 1
a ,: <: +/ (* +/\"1) = a=: 5 6 5 5 6 5 7 6
5 6 5 5 6 5 7 6
0 0 1 2 1 3 0 2
On Wed, Mar 28, 2018 at 11:32 AM, Joe Bogner wrote:
> I think this is an easy one but it's escaping me. How t
I think this is an easy one but it's escaping me. How to calculate a
running count of an item in a list?
runct (1,2,1,1,2) -: 0,0,1,2,1
runct (5,6,5,5,6) -: 0,0,1,2,1
This seems to be a good start
= (5,6,5,5,6)
1 0 1 1 0
0 1 0 0 1
10 matches
Mail list logo