Last active
October 16, 2015 20:26
-
-
Save piyushmaurya23/11d2182abab17f3320ce to your computer and use it in GitHub Desktop.
2. Define a LISP function to compute difference of squares. (if x > y return x 2 -y 2 , otherwise y 2 - x 2 ).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun square_diff(x y) | |
(if (> x y) | |
(- (* x x) (* y y)) | |
(- (* y y) (* x x)))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment