Re: [Jprogramming] Converting if statement

2019-09-09 Thread 'Pascal Jasmin' via Programming
The gerund argument to @. must be all verbs `(x"_) fixes the rightmost one for the left one, the simplest way, you could enclose the operation with 4 : as in 4 : '(] ` (x & mul) @. (2 | y)) mul~ x pow <. -: y' On Monday, September 9, 2019, 12:49:39 p.m. EDT, Eugene Nonko wrote: Hello,

[Jprogramming] Converting if statement

2019-09-09 Thread Eugene Nonko
Hello, I have this recursive dyad defined to calculate modular matrix exponential by squaring: pow =: 4 : 0 if. y = 1 do. x else. (] ` (x & mul) @. (2 | y)) mul~ x pow <. -: y end. ) (mul verb can be defined to perform simple multiplication, then it will work for regu