match=: I.@E.
match1=: (#~ 1 < #&>)@(]\ <@match"1 _ ]) NB. simple but slow
match1s=: 4 : '(1<#&>r)#r=. (n i.s) { y <@match"1 _~ n=. ~.s=. x]\y' NB. faster 
on large arguments

Perhaps adding parentheses in the right places may activate some special code 
for E."1 _.

Louis

> On 18 Dec 2016, at 22:38, Henry Rich <[email protected]> wrote:
> 
> match1 =: (#~ 1 < #@>)@:(]\ </. i.@((- <:)~ #))
> 
> 
> I changed the spec to produce a list of boxes, since there may be differing 
> numbers of matches
> 
> Henry Rich
> 
> 
> 
>> On 12/18/2016 3:32 PM, Skip Cave wrote:
>> aa =: 2 3 4 5 4 3 2 5 6 7 6 5 4 3 2 3 4 5 4
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to