Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun p+ (p1 p2)
- "Adds the two given polynomials together."
- (let ( (output '()) )
- (
- (mapcar #'(lambda (x) ; operates on successive elements of the first polynomial
- (concatenate 'list (list x) output)
- ) p1)
- (mapcar #'(lambda (y) ; does the same with the second polynomial
- (concatenate 'list (list y) output)
- ) p2)
- )
- )
- )
Add Comment
Please, Sign In to add comment