Hello everybody,
actually I post many posts but really I can not solve this problem , I want somebody to help me please
I have these functions to sort a list an I want to transform them to macros or have some macros to do the same thing .
(defun isMember (L E)
"Test if element E is a member of a sorted list L."
(if (null L)
nil
(if (> E (first L))
(isMember (rest L) E)
(= E (first L)))))
(defun insertm (L E)
"Insert element E into a sorted list L to produce a new sorted list."
(if (null L)
(list E)
(if (> E (first L))
(cons (first L) (insertm (rest L) E))
(if (= E (first L))
L
(cons E L)))))
(defun removeelm (L E)
"Remove element E from sorted list L to produce a new sorted list."
(if (null L)
nil
(if (> E (first L))
(cons (first L) (removeelm (rest L) E))
(if (= E (first L))
(rest L)
L))))
pleeeeeeeeeeeeeeeeeeease help me
transform functions to macro
Forum rules
Please respect your teacher's guidelines. Homework is a learning tool. If we just post answers, we aren't actually helping. When you post questions, be sure to show what you have tried or what you don't understand.
Please respect your teacher's guidelines. Homework is a learning tool. If we just post answers, we aren't actually helping. When you post questions, be sure to show what you have tried or what you don't understand.
Re: transform functions to macro
First off, you should edit your post. Mark the code and press Code. It will look better.
What have you tried so far?
What have you tried so far?
I'm the author of two useless languages that uses BF as target machine.
Currently I'm planning a Scheme compiler :p
Currently I'm planning a Scheme compiler :p