If elegance is a concern, I'd go with:

   'ab'  (1 e. E.)S:0  'ac';'cab';'bca';'bab'
0 1 0 1

Thanks,

-- 
Raul

On Tue, Jan 10, 2023 at 1:21 PM Devon McCormick <devon...@gmail.com> wrote:
>
> I doubt performance is very important for the sizes of arguments I
> typically use but David's expression is more elegant.
>
> On Tue, Jan 10, 2023 at 9:29 AM David Lambert <b49p23t...@gmail.com> wrote:
>
> >     (<'ab')  (1 e. E.)&>  'ac';'cab';'bca';'bab'  NB. quicker?
> > 0 1 0 1
> >
> >     (<'ab')  ([: +./ E.)&> 'ac';'cab';'bca';'bab'
> > 0 1 0 1
> >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
>
>
> --
>
> Devon McCormick, CFA
>
> Quantitative Consultant
> ----------------------------------------------------------------------
> 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