Hey, so I'm working on the game set-cubed in Scheme (for those who know the game). Currently, i have a csv file of all the possible dice with dice faces. I'm trying to read this into scheme, and managed to do that with a csvreadermaker. Currently, i can get it into a vector, but i want to pull out individual items in this vector to compare. Preferably, i want something that I can use that acts similarly to a 2 dimensional array. Here's what I have:
(require (planet neil/csv:1:6/csv)) (define set-cubed-csv-reader ;#####Creating our reader for the CSV file##### (make-csv-reader-maker '((separator-chars #\,) (strip-leading-whitespace? . #t) (srtip-trailing-whitespace? . #t)))) (define next-row (set-cubed-csv-reader (open-input-file "setcubed.csv"))) ;####We just defined (next-row) to give us the next row in each line of setcubed.csv
This is some output:
> (define v (next-row))
("dienum" "face1" "face2" "face3" "face4" "face5" "face6")
I want to be able to pull each element out of the vector, but also easily be able to get more vectors for the next line down in the csv file.
How do I go about doing this?