3 ms·
If I hear data structure lisp code is not on my mind, so it's rather an API or a drawing library? Most Lisps, especially Common Lisp which inconvergent is usin
by aerique 9y ago
If I hear data structure lisp code is not on my mind, so it's rather an API or a drawing library?
Most Lisps, especially Common Lisp which inconvergent is using, have plenty of data structures: http://www.lispworks.com/documentation/lw70/CLHS/Front/Contents.htm http://www.lispworks.com/documentation/lw70/CLHS/Front/Conte...
Common Lisp doesn't have a nice literal structure for hash tables/maps/dicts but that is easily mended with a macro.
"(with-snek (snk) ..." is a macro which abstracts away lower level tedious boilerplate. It hands you "snk" on a platter so you can manipulate it.
Common Lisp itself also comes with some of these macros: http://www.lispworks.com/documentation/lw70/CLHS/Front/X_Alph_W.htm http://www.lispworks.com/documentation/lw70/CLHS/Front/X_Alp...
"with-open-file" (skip to the examples) is a nice one since it takes care of opening and closing the file for you so you can write your block of code inside of it and be sure the file gets opened and closed properly:
(with-open-file (f "/path/to/file" :direction :output :if-exists :supersede)
... your code writing to "f" comes here ...
)