What You've Learned

In this chapter, we discussed the more advanced data structures in Common Lisp. We then used this to create a monster-fighting game. Along the way, you learned the following:

  • Arrays are similar to lists, but allow you to access an item at a specific offset more efficiently.

  • Hash tables are similar to alists, but let you look up the value associated with a key more efficiently.

  • Using arrays and hash tables in the appropriate places will usually make your code much faster.

  • The only true way to tell if changing a data structure or algorithm makes your program faster is to time your code with the time command.

  • Common Lisp has generic functions that can be used against multiple datatypes. The most useful of these are sequence functions that can transparently handle lists, arrays, and strings.

  • You can create objects with properties in list using the defstruct command.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.179.225