Hi,
I'm looking for an equivalent to lush's (http://lush.sf.net) "select"
function in common lisp:
(select m n s) ==> returns an array with the n-th dimension removed, and
which is the s-th slice of m in the n-th dimension.
(setq m #((0 1 2 3 4)
(10 11 12 13 14)))
(select m 1 2) ==> #(2 12)
Is there anything like scheme's make-shared-array in common lisp that
could be used for this?
Thanks!
Yury
In article <······························@nyu.edu>,
Yury Sulsky <····@nyu.edu> wrote:
> Hi,
>
> I'm looking for an equivalent to lush's (http://lush.sf.net) "select"
> function in common lisp:
>
> (select m n s) ==> returns an array with the n-th dimension removed, and
> which is the s-th slice of m in the n-th dimension.
> (setq m #((0 1 2 3 4)
> (10 11 12 13 14)))
> (select m 1 2) ==> #(2 12)
>
> Is there anything like scheme's make-shared-array in common lisp that
> could be used for this?
Lisp Machine Lisp has "conformally displaced arrays", which allow you to
create 2-D array that's displaced to a rectangular portion of another
2-D array. But Common Lisp doesn't have anything like this. It was
created specifically to support the needs of the LispM window system --
a window could be displaced to the appropriate area of the frame buffer
memory.
--
Barry Margolin, ······@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***