The relevant methods for this can be seen here 
<https://github.com/NetLogo/NetLogo/blob/5.x/src/main/org/nlogo/api/LogoList.scala#L7-L19>.
 
 Essentially, think of these as static methods on the `LogoList` class. 
 The one you want is probably `LogoList.fromJava`, which takes a Java 
`Iterable` as an argument.

On Friday, December 4, 2015 at 12:15:05 AM UTC-6, Marshall wrote:
>
> I'm writing a small extension, in Java, that include a function that 
> passes a NetLogo list of numbers to a Clojure function, returning a NetLogo 
> list of numbers.  
>
> I'm able to pass the NetLogo list (an org.nlogo.api.LogoList, right?) 
> into Clojure.  Clojure code then treats the LogoList as a normal Clojure 
> sequence of  Doubles (because LogoList implements the Java Collection 
> interface, I assume, and Clojure sequence operations work on Collections).
>
> However, I haven't figured out how to make a LogoList from a Collection, 
> or from a Java array (easy to make in Clojure), or from something else that 
> I know how to make.
>
> I looked at the scaladoc and the source for LogoList and LogoListBuilder, 
> but I don't know Scala, and attempting to create a LogoList based on my 
> guesses and experiments hasn't been successful.
>
> Thanks very much for any tips.
>
> Marshall
>

-- 
You received this message because you are subscribed to the Google Groups 
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to