Search found 30 matches

by megera
Tue Dec 04, 2012 3:50 am
Forum: Common Lisp
Topic: gensym's behavior in a macro
Replies: 6
Views: 10694

Re: gensym's behavior in a macro

Thanks pjstirling ;)
by megera
Sun Dec 02, 2012 8:41 am
Forum: Common Lisp
Topic: gensym's behavior in a macro
Replies: 6
Views: 10694

Re: gensym's behavior in a macro

THANKS!! :D
by megera
Sun Dec 02, 2012 8:05 am
Forum: Common Lisp
Topic: gensym's behavior in a macro
Replies: 6
Views: 10694

Re: gensym's behavior in a macro

HI Goheeca and thankf for your help! Ok I understand reason to use gensym in macro , but yet it is not clear to me why using *,stop* instead *gstop*(gensym variable) in *do* test conditions return NIL.. For example You said that *,stop* will be evaluated only once, but if I ridefine *for* macro in t...
by megera
Sun Dec 02, 2012 6:46 am
Forum: Common Lisp
Topic: gensym's behavior in a macro
Replies: 6
Views: 10694

gensym's behavior in a macro

HI I have a fast & easy question(easy for You ) about gensym used in that macro example: (defmacro for (var start stop &body body) (let ((gstop (gensym))) `(do ((,var ,start (1+ ,var)) (,gstop ,stop)) ((> ,var ,gstop)) ,@body))) >(for x 1 5 (princ x))) 12345 NIL But if I redefine ‘do test ...
by megera
Sat Dec 01, 2012 12:33 pm
Forum: Common Lisp
Topic: Help on setf behavior
Replies: 2
Views: 5189

Re: Help on setf behavior

ooohh PERFECT!!
Thanks Goheeca !!! very much!! :D
by megera
Sat Dec 01, 2012 10:50 am
Forum: Common Lisp
Topic: Help on setf behavior
Replies: 2
Views: 5189

Help on setf behavior

HI
I do not understand why this expr :

Code: Select all

(setf lst nil)
(setf (car lst)(1+ (car (push 1 lst))))

2

lst
(1 2)

return 2 it’s ok, but now if we call lst return is : (1 2)-…??
Instead I’ll expect ( 2 1)…
can somebody
illuminate me?? thanks in advance
by megera
Tue Nov 20, 2012 4:52 am
Forum: Common Lisp
Topic: on &rest and keyword args...
Replies: 11
Views: 24084

Re: on &rest and keyword args...

Ahh, that is the question ! :D I’m starting with 3.1 becouse i’m beginner…and I know that there are important syntax differences with previous releases... frameworks Python based works still with 2.7 for example… ps. I apologize to the Moderators for little OT :!: :!: thanks again to all for...
by megera
Mon Nov 19, 2012 3:16 am
Forum: Common Lisp
Topic: on &rest and keyword args...
Replies: 11
Views: 24084

Re: on &rest and keyword args...

Hi Goheeca and thanks for your code ;) ..I'm studying it becouse is still too advanced for my current low degree :o :o for examp. I still have not studied macros..but I’m close ;)) Thanks Paul!!now the questions about args begins to become clear !! :D Thanks very much to all !!! :mrgreen: ps.Paul ...
by megera
Sun Nov 18, 2012 7:04 am
Forum: Common Lisp
Topic: on &rest and keyword args...
Replies: 11
Views: 24084

Re: on &rest and keyword args...

HI Thanks also to You Poul for help.. Well, summaries I would just like to know whether it is possible achieve a flexible behavior like in this trivial example of func (written in Python) that can accepts arbitrarily positional variables args(&rest) with keyargs, or only positional variables arg...
by megera
Sat Nov 17, 2012 3:44 pm
Forum: Common Lisp
Topic: on &rest and keyword args...
Replies: 11
Views: 24084

Re: on &rest and keyword args...

ok thanks for reporting and fast explanation !! then when I define a func with &rest and also keyword parameters , I can pass it only keyword args… because it can’t accept (in this case) a variable number of arguments….right?... but ther’s a way to mix ‘really’ &rest and &key...