Wrong result with map function in deferred mode
The following example
a = (n: 2., 3.)
f(x) = x/1*e
b = map(f, a)
e = 2
p = 1
print(b, (b: f(2), f(3)))
returns the expected result (b: 4.0, 6.0) (b: 4.0, 6.0)
. But if we replace the 1 with p:
a = (n: 2., 3.)
f(x) = x/p*e
b = map(f, a)
e = 2
p = 1
print(b, (b: f(2), f(3)))
the result is (b: 1.0, 0.6666666666666666) (b: 4.0, 6.0)
.
The problem occurs in deferred evaluation mode.