Paul Morris <p...@paulwmorris.com> writes: > Hi, I’m rewriting one of LilyPond's C++ routines in Guile/Scheme in > order to customize it for my own use, and it uses some nested > dictionary/map/alist-style data structures that you can modify using > something like this in C++: > > mydata[aaa][bbb].ccc = 10; > Depending on the number of entries in each nesting level, and other (performance/space) tradeoffs, hash tables might be a good fit as an associative array data structure:
https://www.gnu.org/software/guile/manual/html_node/Hash-Tables.html http://srfi.schemers.org/srfi-69/srfi-69.html http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib-Z-H-14.html Guile 2.0 supports all three of these APIs -- choosing between them is mostly important if you care about portability to different Scheme implementations (which I'd guess is not high priority in the context of lilypond). HTH, Rotty -- Andreas Rottmann -- <http://rotty.xx.vu/>