When reading http://www.miranda.org/~jkominek/rot13/
I noticed they had a K implementation, but not a J
implementation.

I tried my hand, and I can not quite match the K
implementation for conciseness.

rot13=: {&((+...@#)65 13 13 6 13 13 133#7$0 13 _13)&.(a.&i.)

I searched the forums and did not find anything shorter.

I think we should have a more concise way of
expressing the constant
   (+...@#)65 13 13 6 13 13 133#7$0 13 _13
perhaps something which uses amend?

That said, you should probably not try this:
   q:A.(+...@#)65 13 13 6 13 13 133#7$0 13 _13
unless you are prepared to use jbreak.

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

Reply via email to