[Cs254f11] Basic vector question
Lee Spector
lspector at hampshire.edu
Sun Oct 9 18:48:07 EDT 2011
I think I must not be understanding your question, but:
(def foo [1, 5])
(get foo 0)
; 1
(get foo 1)
; 5
What are you looking for that isn't this?
-Lee
On Oct 9, 2011, at 6:41 PM, James Matheson wrote:
> This is a little basic but how do you access an element within a
> vector? I know (nth x) or (get x) will return the value at that index,
> but if I'm trying to get something where the value is [1, 5] how do I
> access 1 or 5 directly?
>
> Thanks in advance,
> Jamie
> _______________________________________________
> Cs254f11 mailing list
> Cs254f11 at lists.hampshire.edu
> https://lists.hampshire.edu/mailman/listinfo/cs254f11
--
Lee Spector, Professor of Computer Science
Cognitive Science, Hampshire College
893 West Street, Amherst, MA 01002-3359
lspector at hampshire.edu, http://hampshire.edu/lspector/
Phone: 413-559-5352, Fax: 413-559-5438
More information about the Cs254f11
mailing list