Currying with OOP:
res = x .mult(2) .add(1) .sub(3) .mod(x)
res = x res *= 2 res += 1 res -= 3 res %= x
scale = 2 offset = 1 - 3 with_scale = x * scale with_offset = with_scale + offset result = with_offset % x
(let* ((scale 2) (offset (- 1 3)) (with_scale (* x scale)) (with_offset (+ with_scale offset))) (remainder with_offset x))
Currying with OOP:
Currying with assignment operators: Naming things instead of Currying: Or aping that in Scheme: