clear,  thanks for your reply, i am new clojure learner , i am trying to 
fully understand the book, 

On Wednesday, July 22, 2015 at 11:48:06 PM UTC+8, Fergal Byrne wrote:
>
> The vector of parameter names is matched to the actual parameter values 
> when the fn is called, so it's equivalent to
>
> (let [x val1 y val2] ...)
>
> when (hypot val1 val2) is called.
>
>
>  
> --
>
> Fergal Byrne, Brenter IT
>
> Author, Real Machine Intelligence with Clortex and NuPIC 
> https://leanpub.com/realsmartmachines
>
> Speaking on Clortex and HTM/CLA at euroClojure Krakow, June 2014: 
> http://euroclojure.com/2014/
> and at LambdaJam Chicago, July 2014: http://www.lambdajam.com
>
> http://inbits.com - Better Living through Thoughtful Technology
> http://ie.linkedin.com/in/fergbyrne/ - https://github.com/fergalbyrne
>
> e:fergalb...@gmail.com <javascript:> t:+353 83 4214179
> Join the quest for Machine Intelligence at http://numenta.org
> Formerly of Adnet edi...@adnet.ie <javascript:> http://www.adnet.ie
>
>
> On Wed, Jul 22, 2015 at 1:25 PM, Gary Trakhman <gary.t...@gmail.com 
> <javascript:>> wrote:
>
>> I am looking at the definition of fn and I can't see where let is used 
>> inside the function definition: 
>> https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L4335
>>
>> I think they're saying the binding forms are equivalent in power 
>> (destructuring), not implementation.
>>  
>> On Wed, Jul 22, 2015 at 8:07 AM Johnny Wong <zhanla...@gmail.com 
>> <javascript:>> wrote:
>>
>>>  page 27(pdf version):
>>> "
>>>  
>>> Local Bindings: let
>>>
>>>
>>>   let allows you to define named references that are lexically scoped 
>>> to the extent of the let expression. Said another way, let defines 
>>> locals.
>>>  ......
>>> ...
>>>  
>>> Note that let is implicitly used anywhere locals are required. In 
>>> particular, fn (and therefore all other function-creation and 
>>> function-definition forms like defn) uses let to bind function 
>>> parameters as locals within the scope of the function being defined. For 
>>> example, x and y in the hypot function above are let-bound by defn. *So, 
>>> the vector that defines the set of bindings for a let scope obeys the same 
>>> semantics whether it is used to define function parameters or an auxiliary 
>>> local binding scope.*
>>>
>>>
>>>  *"*
>>>
>>>  i am confused about the text in red.  apparently ,the vector used  for 
>>> let locale binding is not the same as the vector used for function 
>>> parameters , for example 
>>>
>>>
>>> (defn hypot 
>>>
>>>   [x y]
>>>
>>> (let [x2 (* x x) y2 (* y y)]
>>>
>>>    (Math/sqrt (+ x2 y2)))
>>>
>>> )
>>>
>>>
>>> the second line [x y] vector says the function has two parameter, it 
>>> doesn't mean let x=y, while , the third line ,it means  let x2=(* x x), it 
>>> is set value operation. 
>>>
>>>
>>> is it a book error ?
>>>   
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@googlegroups.com 
>>> <javascript:>
>>> Note that posts from new members are moderated - please be patient with 
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+u...@googlegroups.com <javascript:>
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to clojure+u...@googlegroups.com <javascript:>.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> <javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to