On Fri, Dec 11, 2015 at 6:56 PM, Ryan Eckbo <ec...@cim.mcgill.ca> wrote:

> inc=: >:&.(26&#.)&.(alpha&i.)
>

​I get:

   inc 'a'
b
   inc 'z'
ba
   inc 'y'
z

And my grasp of J isn't strong enough to figure out why. I came up with
this alternative that seems to work:

inc =: ((26&|)@>:)&.(alpha&i.)

Perhaps that could be simplified.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to