On Dec 21, 2007 3:22 PM, Jack Andrews <[EMAIL PROTECTED]> wrote:
> ...
>   upper=: (a.,~a.{~65+i.26) {~ (a.,~a.{~97+i.26) i. ]
>   lower=: (a.,~a.{~97+i.26) {~ (a.,~a.{~65+i.26) i. ]
>
> seems a little unwieldy... are there better ways?

One nice feature of these definitions is that you don't need
them both, as they are the inverse of each other -- which is
really to be expected of such operations:

   (upper -: lower inv) a.
1
   (lower -: upper inv) a.
1

So, you could define e.g.

   lower=: upper inv

Boyko
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to