^:(#@]) ? -- Raul
On Saturday, August 20, 2011, Brian Schott <[email protected]> wrote: > I have been working on my version of findinrows so that it will work > on repeated strings such as 'TAGG' but need some help in proceeding > further. > findinrows=: (0~:#)&>@{."1@([:(({.@:i.}.[);}.@])&>/"1^:_ (,&<)"1) > NB. this is the original > findinrows=: (0~:#)&>@{."1@([:((([{.@:(>:@i.){.@])}.[);}.@])&>/"1^:_ > (,&<)"1) NB. this is a slight update where One is added to the result > of dyadic i. > > But instead of _ for the count of repeat, the number letters in the y > argument needs to be used. So, for example with 'TAG' I need ^:3 and > for 'TAGG' I need ^:4 . The result is quite fast but I have not been > able to make the argument to ^: a variable amount. > > On Thu, Aug 18, 2011 at 3:34 PM, Brian Schott <[email protected]> wrote: >> findinrows=: (0~:#)&>@{."1@([:(({.@:i.}.[);}.@])&>/"1^:_ (,&<)"1) >> A findinrows 'TAG' >> > > > > -- > (B=) <-----my sig > Brian Schott > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
