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 <zhanlandet...@gmail.com> 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 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.
>

-- 
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