I'm getting old, but still remember my solution, improved by Hui: http://www.jsoftware.com/pipermail/general/2004-May/017503.html
'abcabbe' strikeb2 'babe' cab Curious how it performs compared to the other solutions. R.E. Boss > -----Original Message----- > From: Programming [mailto:[email protected]] > On Behalf Of June Kim (???) > Sent: maandag 18 januari 2016 5:19 > To: Programming forum <[email protected]> > Subject: [Jprogramming] A Different Less? > > Hello > > I am looking for a verb(cless) that does something similar to Less(-.) but > counting the elimination, for example: > > 'abcabbe' -. 'abbe' > > c > > 'abcabbe' cless 'babe' NB. get rid of y letters counting the occurrences > > 'cab' > > > It is easier to define such a verb recursively: 'abcabbe' cless 'babe' > equald to 'e' cless~ 'b' cless~ 'a' cless~ 'b' cless~ 'abcabbe' > > > I think recursive definition isn't a usual J-ic approach. > > > How would you implement such a verb elegantly(with which I mean short)? > > > June > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
