Re: [frogs] Guitar capo code in scheme

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]




On 7/26/11 11:07 AM, "Wols Lists" <antlists@xxxxxxxxxxxxxxx> wrote:

> On 26/07/11 08:24, Carl Sorensen wrote:
>> let* is like let, but in let* a variable that is defined can be used later
>> on.
>> 
>> So
>> 
>> (let ((var1 10)
>>       (var2 (+ var1 10)))
>> 
>> will throw an error for "undefined variable var1"
>> 
>> but
>> 
>> (let* ((var1 10)
>>        (var2 (+ var1 10)))
>> 
>> will set the value of var1 to 10 and var2 to 20.
>> 
> Do you mean let* will allow you to use the variable further down the
> variable definition section?

Yes, precisely.  I'm sorry I was unclear.

Here's the definition from the Guile docs.

<http://www.gnu.org/software/guile/manual/html_node/Local-Bindings.html#Loca
l-Bindings>

Thanks,

Carl


---
----
Join the Frogs!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/