[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Always using let*
From: |
Drew Adams |
Subject: |
RE: Always using let* |
Date: |
Sun, 14 Sep 2014 15:56:19 -0700 (PDT) |
> > (let ((c (+ c 4))
> > (b (* c 42))) ; Use original C value: 3
> > ...)
>
> That makes my head spin. ;-)
Does this make it easier for you?
(let ((c 5)
(b c)) ; Use value of the `c' that is bound outside.
...)
And remember that the local binding of `c' to 5 can bind an
existing dynamic variable (from, say, `(defvar c 3 "C doc")')
for the duration of this `let'. Or it can bind an existing
lexically scoped variable `c' from an outer `let' for the scope
(or for the duration, if `lexical-binding'=`nil') of this inner
`let'. Or it can create and bind a new variable.
This answers the question of why you might not use a different
name from `c': because you want to bind an existing variable
named `c'.
- Re: Always using let*, (continued)
- Message not available
- Re: Always using let*, sokobania . 01, 2014/09/16
- RE: Always using let*, Drew Adams, 2014/09/16
- Re: Always using let*, Stefan Monnier, 2014/09/16
- Re: Always using let*, Emanuel Berg, 2014/09/16
- Message not available
- Re: Always using let*, Emanuel Berg, 2014/09/16
- Re: Always using let*, Stefan Monnier, 2014/09/16
- Re: Always using let*, Emanuel Berg, 2014/09/16
Re: Always using let*, Joe Fineman, 2014/09/14
Message not available
Message not available
Message not available
Message not availableRe: Always using let*, Stefan Monnier, 2014/09/14
Re: Always using let*, Pascal J. Bourguignon, 2014/09/14
Re: Always using let*, Stefan Monnier, 2014/09/15
RE: Always using let*, Drew Adams, 2014/09/15
Re: Always using let*, Stefan Monnier, 2014/09/15
Message not availableRe: Always using let*, Emanuel Berg, 2014/09/15