From: Ben Pozin
Subject: Could someone explain me
Date: 
Message-ID: <5shP3.16767$%62.258274@c01read02-admin.service.talkway.com>
how the Let function works ?

thank you in advance
--
Posted via Talkway - http://www.talkway.com
Exchange ideas on practically anything (tm).

From: Stig Hemmer
Subject: Re: Could someone explain me
Date: 
Message-ID: <ekvk8oca8no.fsf@epoksy.pvv.ntnu.no>
[Could someone explain me]
"Ben Pozin" <········@cdr.toronto.edu> writes:
> how the Let function works ?

I would recommend getting a book to get started and coming here only
with the questions the book leave unanswered.

If you are going to a use a Common Lisp, Paul Grahams "ANSI Common
Lisp" is a good book.

Stig Hemmer,
Jack of a Few Trades.
From: Erik Winkels
Subject: Re: Could someone explain me
Date: 
Message-ID: <87ln8str25.fsf@sammael.downstairs.nl>
Stig Hemmer <····@pvv.ntnu.no> writes:

> [Could someone explain me]
> "Ben Pozin" <········@cdr.toronto.edu> writes:
> > how the Let function works ?
> 
> I would recommend getting a book to get started and coming here only
> with the questions the book leave unanswered.
> 
> If you are going to a use a Common Lisp, Paul Grahams "ANSI Common
> Lisp" is a good book.

Also, David B. Lamkins' "Successful Lisp: How to Understand and Use
Common Lisp" online book might be a good start if he does not want to
shell out cash right away. Available at:

        http://psg.com/~dlamkins/left/sl/sl.html
From: Gareth McCaughan
Subject: Re: Could someone explain me
Date: 
Message-ID: <86wvscmr2j.fsf@g.local>
Ben Pozin wrote:

> how the Let function works ?

Do you mean "how you use it" or "what it does" or "how the
compiler deals with it"?

Basically, LET is rather like introducing block-scoped
local variables in C: where Lispers say

    (let ((a 1234)
          (b "I am the walrus"))
      ...)

C programmers would say

    {
      int a = 1234;
      const char * b = "I am the walrus";
      ...
    }

or something of the kind. The effect, in each case, is
to introduce new variable bindings.

That should be enough if you're already comfortable with
this kind of thing in C or another language. (There are
some differences -- you might like to look up the difference
between LET and LET* some time, for instance -- but the
idea is right.)

If you haven't used any language with block-scoped
variables, it's a bit harder. Briefly, if you say

    (let ((a 1234)
          (b "I am the walrus"))
      ...)

then the result is rather like telling the computer
that within the "..." you are using "a" to mean the
number 1234, and "b" to mean the string "I am the
walrus". Only "rather like", because you can change
the values of "a" and "b":

    (let ((a 1234)
          (b "I am the walrus"))
      (format t "~&a=~A")
      (setf a -4321)
      (format t "~&a=~A"))

will print out

    a=1234
    a=-4321

But the effects of this change are isolated to within
the region of program delimited by the LET.

Does that help at all?

-- 
Gareth McCaughan  ················@pobox.com
sig under construction
From: William Deakin
Subject: Re: Could someone explain me
Date: 
Message-ID: <38141F31.262620D5@pindar.com>
Dear Ben,

Your subject, "Could someone explain me?" raises a number of interesting
epistimological questions ;) However, I'm certain that c.l.l. is not the
correct place to discuss them,

Best Regards,

:) will