|
From: | Noah Lavine |
Subject: | Re: propose deprecation of generalized-vector-* |
Date: | Mon, 18 Feb 2013 11:29:47 -0500 |
From: Noah Lavine <address@hidden>> I haven't worked with the array functionality, so I might be missingOne could imagine a Matlab-like syntax where array-ref has to have
> something, but I don't see why this is natural for array-ref.
the same number of indices as the underlying array, but, if an
index were replaced with a symbol, it would return a slice.
if np is [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
(array-ref np 1 1) -> 5
(array-ref np 1 :) -> [4, 5, 6]
(array-ref np : 1) -> [[2], [5], [8]]
Or maybe that's already in Scheme. I'll admit I've never done matrices
in scheme.
[Prev in Thread] | Current Thread | [Next in Thread] |