Replacing elements in a list
Re: Replacing elements in a list
Nope I say it again... It isnt homework
-
- Posts: 148
- Joined: Wed Jul 30, 2008 11:26 pm
Re: Replacing elements in a list
Then why in the world are you so obsessed with this? LAMBDA isn't something you just “modify a function with†— what you say you want to do makes absolutely no sense that I can see.Lispoman wrote:Nope I say it again... It isnt homework

-
- Posts: 406
- Joined: Sat Mar 07, 2009 6:17 pm
- Location: Brazil
- Contact:
Re: Replacing elements in a list
The reason people here is thinking that this is homework is that no one is understanding what exactly you want, what you are saying makes no sense. When someone say something that makes no sense it usually means that that person got an exercise wrong.Lispoman wrote:Nope I say it again... It isnt homework
Perhaps what you want is to use mapcar to avoid recursion?
Code: Select all
(defun myfunc (x)
(mapcar (lambda (elt)
(if (< elt 0)
(intern (format nil "*~a" elt))
elt))
x))