Skip to content

Instantly share code, notes, and snippets.

@piyushmaurya23
Last active October 16, 2015 20:26
Show Gist options
  • Save piyushmaurya23/11d2182abab17f3320ce to your computer and use it in GitHub Desktop.
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 ).
(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