The boolean-array function is new in 1.1

Sean

On Dec 12, 12:37 pm, Michael Wood <esiot...@gmail.com> wrote:
> 2009/12/12 Amol Dharmadhikari <a...@dharmadhikari.org>:
>
>
>
>
>
> > Hi All,
>
> > Apologies for a newbie question:
>
> > I am trying to invoke some java libraries from clojure and some of the
> > methods take boolean arrays as their parameters.
>
> > The documentation
> > (http://richhickey.github.com/clojure/clojure.core-api.html#clojure.co...)
> > does say that there is a boolean-array function. However, attempting to
> > invoke this function from repl throws an exception:
> > user=> (boolean-array)
> > java.lang.Exception: Unable to resolve symbol: boolean-array in this context
> > (NO_SOURCE_FILE:8)
>
> > Am I missing something? I am using clojure version 1.0
>
> I don't think boolean-array exists in 1.0.  Try this instead:
>
> user=> (into-array Boolean [true true false true])
> #<Boolean[] [Ljava.lang.Boolean;@15fc40c>
>
> although that gives you an array of Booleans instead of booleans.
>
> --
> Michael Wood <esiot...@gmail.com>

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

Reply via email to