Hi Pierpaolo,

Yes, I could read the data into a list and then create an array from it:

(array-ref (apply array (shape 0 3 0 3) '(1 2 3 4 5 6 7 8 9)) 2 2)
9

But, I don't seem to be able to do the same from a vector:

(array-ref (apply array (shape 0 3 0 3) #(1 2 3 4 5 6 7 8 9)) 2 1)
apply: expects type <proper list> as 3rd argument, given: '#(1 2 3 4 5 6 7
8 9); other arguments were: #<procedure:array>
#<array:srfi-9-record-type-descriptor>

-Joe

On Mon, Mar 26, 2012 at 2:11 AM, Pierpaolo Bernardi <olopie...@gmail.com>wrote:

> On Mon, Mar 26, 2012 at 01:31, Joe Gilray <jgil...@gmail.com> wrote:
> > Hi Tom,
> >
> > thanks for the comments.
> >
> > As far as reading the data into a vector, that can be accomplished with
> > "(define vec (read in))"  I was more interested in how to create an
> srfi/25
> > array from that vector.
>
> (apply array (shape 0 3 0 3) '(1 2 3 4 5 6 7 8 9))
> #<array:srfi-9-record-type-descriptor>
>
> Does this help?
>
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to