Tiny math processor

Select an example:
or type the expressions:
Evaluate

Output of eval() and print():

Function graph of draw():
Canvas not supported!

Following operations are supported:
+, -, *, /, ^(power), ~(square root), =(assignment) and
'var(derivation in a variable var)

And commands:
eval(exp) - evaluate an expression and print the result.
print(exp) - print the expression.
draw(exp,var) - chart the expression for variable var.

Examples:

y=(x-1)^2     - define function y=(x-1)^2
print(y)      - print the function y
z=y'x         - set z to the first derivate of y on x
print(z)      - print z
x=2           - set x to 2
eval(y)       - evaluate y, 1+(2-1)^2 prints 1
draw(y,x)     - draw y
draw(z,x)     - and draw z

Not for homework. No warranties for the results.
This is just a parser and monadic computation demo.