({. , #)/.~ 1 2 3 3 4 1 1 2 1 3 2 4 1 Backed by special code: http://www.jsoftware.com/docs/help701/dictionary/special.htm
On Wed, Oct 12, 2011 at 10:37 AM, Henry Rich <henryhr...@nc.rr.com> wrote: > (~. ,. #/.~) 1 2 3 3 4 > 1 1 > 2 1 > 3 2 > 4 1 > > > Backed by special code. > > Henry Rich > > On 10/11/2011 5:33 PM, David Vaughan wrote: >> How could I count occurrences of the same number in a sorted list? >> >> e.g. list =. 1 2 3 3 4 >> 1 1 >> 2 1 >> 3 2 >> 4 1 >> >> or something along those lines. >> >> Thanks. >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm >> > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm