thanks)
--
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
oh wait...I take a look on binding and with-binding* realesation.
http://github.com/richhickey/clojure/blob/f4c58e3500b3668a0941ca21f9aa4f444de2c652/src/clj/clojure/core.clj#L1251
Why with-binding* function wasn't write like this:
(defn with-bindings*
[bindings f args]
(assert-args binding
On Feb 15, 12:03 pm, Аркадий Рост arkr...@gmail.com wrote:
oh wait...I take a look on binding and with-binding*
realesation.http://github.com/richhickey/clojure/blob/f4c58e3500b3668a0941ca21f9a...
Why with-binding* function wasn't write like this:
(defn with-bindings*
[bindings f args]
On Mon, Feb 15, 2010 at 7:25 AM, Аркадий Рост arkr...@gmail.com wrote:
Hi!
I was playing a bit with with-bindings* function, but I got error
every time.
I've tried:
(def a 5)
(with-bindings* {a 3} println a) ;; got java.lang.Integer cannot be
cast to clojure.lang.Var
(with-bindings*
Yeah.. That function is very confused. I didn't check it, sorry.
I don't understand the reason to make the argument binding-map:
for example, using binding macro:
(binding [a 5] ...do something...) ;;using vector to contain bindings.
but using with-bindings*:
(with-bindings* {#'a 5} f args)
On 15 February 2010 19:37, Аркадий Рост arkr...@gmail.com wrote:
I don't understand the reason to make the argument binding-map:
with-binding* is used in the definition of bound-fn*, which seems like
a pretty useful thing to have. The reason it accepts a Var / value map
is probably the fact that
Hi,
On Feb 15, 7:37 pm, Аркадий Рост arkr...@gmail.com wrote:
for example, using binding macro:
(binding [a 5] ...do something...) ;;using vector to contain bindings.
Beware the Leopard!
user= (def a 5)
#'user/a
user= (declare b)
#'user/b
user= (binding [a 1 b (inc a)] b)
6
user= (let [a 1 b
Hi!
I was playing a bit with with-bindings* function, but I got error
every time.
I've tried:
(def a 5)
(with-bindings* {a 3} println a) ;; got java.lang.Integer cannot be
cast to clojure.lang.Var
(with-bindings* [{a 3}] println a) ;;got
clojure.lang.PersistentArrayMap cannot be cast to
(with-bindings* {#'a 3} println a)
with-bindings* expects the keys of the bindings map to be Vars, not symbols.
Sincerely,
Michał
--
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
ok...Then what was the reason to use map instead of vector as usually?
--
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
10 matches
Mail list logo