That makes sense. Thanks for the quick help!
On Jul 14, 2:40 pm, Chouser wrote:
> On Tue, Jul 14, 2009 at 3:04 PM, bgray wrote:
>
> > I'm not sure if this is a binding issue or not.
>
> > user=> (def a 1)
> > #'user/a
> > user=> (binding [
I'm not sure if this is a binding issue or not.
user=> (def a 1)
#'user/a
user=> (binding [a 3] (filter #(= % a) '(1 2 3)))
(1)
user=>
In this case, I was expecting a list with 3 in it.
Thanks,
Brandon
--~--~-~--~~~---~--~~
You received this message because you a
er question entirely.
>
> In any case, the fact that it is not documented seems like a bug,
> especially since this behavior is different from let (as you point
> out).
>
> Tom
>
> On Jul 11, 9:01 pm, bgray wrote:
>
>
>
> > Is this behavior expected fr
Is this behavior expected from binding?
user=> (def a nil)
#'user/a
user=> (def b nil)
#'user/b
user=> (binding [a 1 b (+ a 1)] a)
java.lang.NullPointerException (NO_SOURCE_FILE:0)
user=> (binding [a 1 b (+ a 1)] b)
java.lang.NullPointerException (NO_SOURCE_FILE:0)
user=> (let [a 1 b (+ a 1)] a)
I have a some what (I believe) easy question. Could someone let me
know what I'm doing wrong? A simplified version of what I'm trying to
do looks like this:
user=> (def foo (ref 0))
#'user/foo
user=> (defn square [x] (* x x))
#'user/square
user=> (defn square-ref [x] (dosync (alter foo square x
I'm in the process of working on a *nix system library that will be
able to perform tasks based on OS type (Linux, Solaris, AIX, etc.) and
possibly filesystem type in the future. While doing this commands
vary across the operating systems. To get around this I plan on
writing a dispatch function