Hey folks,
I have a vector of toy-cars and I’m trying to figure out how to print them out so each entry is on a newline like below:
Hot Wheels Ford Mustang 1967
Matel GMC Pacer 1975
Hot Wheels Ford Mustang 1968
Hot Wheels Ford Mustang 1972
Hot Wheels Ford Mustang 1973
I created a helper function, “car-cax”, that takes in a single car object and prints it out as a formatted string (so four fields with manufacturer, make, model, and year). I then have a (format-cars cars) function that takes the the vector of cars as an argument and calls (map car-fax cars). It’s printing out the list of cars, but I’m stuck on how to get each entry in the vector to print on a new line. Any advice?