lundi 26 janvier 2015

LISP function to return the greater number


Vote count:

0




I feel like an idiot asking for help for this, but I have been stuck for hours now, and I haven't been able to find anything on the internet that can help me.


I am trying to write a function in LISP that takes in two parameters and returns the number that is greater. Here's what I have at the moment, but I keep getting errors:





(defun greater (x y)
(if (> x y) x y))



I am calling it like this:



asked 41 secs ago







LISP function to return the greater number

Aucun commentaire:

Enregistrer un commentaire