On Tue, Sep 18, 2012 at 9:20 PM, Andrew wrote:
> I tried this but it didn't work. (identical? (array 1 2) (foo)) Did you mean
> this?
No. Sorry I meant that equality between two primitive arrays is based
on whether they point to the same thing in memory. You want to test
two arrays for equality i
I tried this but it didn't work. (identical? (array 1 2) (foo)) Did you
mean this?
On Tuesday, September 18, 2012 5:08:11 PM UTC-4, David Nolen wrote:
>
> On Tue, Sep 18, 2012 at 4:54 PM, Andrew >
> wrote:
> > In my ClojureScript unit tests, the following doesn't evaluate to true
> (=
> > (ar
On Tue, Sep 18, 2012 at 5:07 PM, Andrew Cheng wrote:
> FYI, in #clojure, duck11232 suggested the following which works for me.
>
> (defn arr= [a b] (not (or (< a b) (> a b
This is not valid Clojure. Using this in CLJS will result in things
like the following:
(arr= (array 1) (array "1"))
;;
h all foo does is return (array 1 2).
>
> What should I do differently?
>
> On Tuesday, January 10, 2012 2:51:06 PM UTC-5, David Nolen wrote:
>>
>> There is no array literal syntax yet, but (array 22 33) should work for
>> you.
>>
>> On Tue, Jan 10, 2012 at 2:46
On Tue, Sep 18, 2012 at 4:54 PM, Andrew wrote:
> In my ClojureScript unit tests, the following doesn't evaluate to true (=
> (array 1 2) (foo)) even though all foo does is return (array 1 2).
>
> What should I do differently?
Those are primitive mutable arrays and are compared via identity.
Davi
In my ClojureScript unit tests, the following doesn't evaluate to true (=
(array 1 2) (foo)) even though all foo does is return (array 1 2).
What should I do differently?
On Tuesday, January 10, 2012 2:51:06 PM UTC-5, David Nolen wrote:
>
> There is no array literal syntax yet, bu
There is no array literal syntax yet, but (array 22 33) should work for you.
On Tue, Jan 10, 2012 at 2:46 PM, billh2233 wrote:
> How do I code an array literal in clojurescript that translates to an
> array literal in javascript? What's the syntax?
>
> If I code in clojurescri
How do I code an array literal in clojurescript that translates to an
array literal in javascript? What's the syntax?
If I code in clojurescript:
... [22 33] ...
it translates to a javascript vector:
cljs.core.Vector.fromArray([22,33])
Javascript (fx/Animation) needs an array defining a