Modular arithmetic: Difference between revisions
Content added Content deleted
m (→{{header|J}}) |
m (→{{header|J}}) |
||
Line 708: | Line 708: | ||
=={{header|J}}== |
=={{header|J}}== |
||
J does not allow "operator redefinition", but J's operators are capable of operating on values which represent modular integers: |
J does not allow "operator redefinition", but J's operators are capable of operating consistently on values which represent modular integers: |
||
<lang J> f=: (+./1 1,:_101{.1x)&p.</lang> |
<lang J> f=: (+./1 1,:_101{.1x)&p.</lang> |