Material to Understand

Exercises

  1. Declare a structure called playing-time that can hold the number of minutes and seconds that a song lasts.
  2. Instantiate a variable of this structure type and set its minutes to 5 and its seconds to 3.
  3. Declare another structure called song that can hold the name of a song and its playing time (which is a structure of the type declared above).
  4. Instantiate a variable of this structure type and set its name to Les Copains D'abord and its time to 3 minutes and 5 seconds.
  5. Print out the name of the song.
  6. Print out the playing time of the song.
  7. Declare an array that can contain up to 3 songs.
  8. Fill in the array with values of your choosing.
  9. Write a function that will print out the contents of this array using format statements.
  10. Use the describe function.

Useful Labor Saving Tip from a Former Student

(defun test ( )

  ;; Load the appropriate file, in this case, this one.
  ( load "~account/stuff.l" )

  ;; Do I want tracing on this?
  ( trace factorial )

  ;; Call the desired function with the desired input
  ( factorial 10 )

)