On Oct 9, 7:28 pm, Sacha <[EMAIL PROTECTED]> wrote:
> On Oct 9, 8:46 pm, Stuart Halloway <[EMAIL PROTECTED]> wrote:
>
> > You can to force evaluation of *indent* while preserving the lazyness
> > of the code that uses *indent*:
>
> > (with-indent
> > (print *indent*)
> > (let [ind *indent*]
> > (lazy-cons ind (cons ind nil))))
>
> > If this idiom is useful often enough there could be a macro for it. Or
> > maybe there already is. :-) Rich?
>
> That won't make it for functions recursively building lazy sequences.
>
> Anyways in common lisp :
>
> CL-USER 1 > (defvar *bleh* 10)
> *BLEH*
> CL-USER 2 > (let ((*bleh* 100))
> (lambda () *bleh*))
> #<anonymous interpreted function 200D3762>
> CL-USER 3 > (funcall *)
> 10
>
> So I guess it's the cost of lazyness ! I'll just pass the indent
> parameter around. It will be a problem to always do without specials
> though.
I'm confused - what was your expectation here? In what way is Clojure
different from CL?
Rich
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---