Closed newptcai closed 1 year ago
This is different from this behaviour
julia> ex = (x-y)*(x+2y)
(x - y)⋅(x + 2⋅y)
julia> println(subs(ex, (x, 3)))
(3 - y)*(2*y + 3)
julia> println(subs(ex, (y, 3)))
(x - 3)*(x + 6)
julia> println(ex)
(x - y)*(x + 2*y)
println
returns nothing
and the variable ans
is bound to the last result printed to the REPL. You should remove the println
statement to get what you want, or even better, assign the result to a variable with a different name.
println
returnsnothing
and the variableans
is bound to the last result printed to the REPL. You should remove theprintln
statement to get what you want, or even better, assign the result to a variable with a different name.
:astonished: Oh the ans
is a special variable! I didn't know that.
The following code in REPL is bit strange
How can substitute
n
by4
turnsans
intonothing
?