|
|
|
|
|
by andsoitis
1114 days ago
|
|
> No they're not. Yours is wrong. Multiplication has higher priority than addition so the order of evaluation begins with (x * 2) not (1 + x). OK, I shouldn't have gone that far. FWIW, modulus has the same operator precedence as multiplication and division. So really, it is more like: (- (+ 1 (* x 2)) (mod 3 x))
or using the increment function:(- (1+ (* x 2)) (mod 3 x))
|
|