On Mon, Aug 30, 2010 at 8:22 AM, R.E. Boss <[email protected]> wrote: > Further improvement: > > grp=: +/@( >/~ [:(1+[:i.<.)&.(10&^.) >./) > NB. replaces the rather slow 10&(<....@^.) > This solution works as it just changes problem of 'how to drop the leading zeros' to become a 'make +! return the desired value when it is at the leading zero positions', very clever.
However, I am still interested to see how can the problem mentioned by Marshall be tackled ? That is the original problem of 'I have some leading number or character or whatever it is' that I want to drop. Raul's solution so far seems to be the fastest and still generic enough to be a 'dropWhile' HOF. Though I still need the "1 in order to make it work. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
