Hi!

There's a fairly substantial problem with chapter 32 of FSOJ, as it uses
this definition for mod:

mod=: adverb : 'n&|@x'


Aside the fact that using it as defined yields a domain error (easily
solved using N instead of n), there is a problem where afterwards the
article seems to assume that reassigning n (or N) influences mod.

However, it does not (at least in recent J), and would need redefining mod
every time a different N is used.


Would replacing mod by the following definition be acceptable:

mod =: 2 : 'n&|@u' ? It is then used as (^ mod 10) for modulo 10
exponentiation, for instance.


What do you think?

Best regards,


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

Reply via email to