- #1
JamesBwoii
- 74
- 0
Hi, I'm new to lisp and I've been set some coursework in it and I don't really know how to begin. I need to implement polynomial arithmetic so I can add, subtract and multiply polynomials.
So like:
$\left(x + y\right)\left(x + y\right) = \left({x}^{2} + 2xy + {y}^{2}\right)$
It also needs to collect terms so:
$\left(x+y\right)+\left(x\right) = 2x + y$
It needs to all be in a functional style and I can't use the built in loop function or non-functional operators like push, pop, mapcan, set, etc.
How should I begin going about this?
Thanks! :D
So like:
$\left(x + y\right)\left(x + y\right) = \left({x}^{2} + 2xy + {y}^{2}\right)$
It also needs to collect terms so:
$\left(x+y\right)+\left(x\right) = 2x + y$
It needs to all be in a functional style and I can't use the built in loop function or non-functional operators like push, pop, mapcan, set, etc.
How should I begin going about this?
Thanks! :D