Panicz Maciej Godek <godek.mac...@gmail.com>: > Scheme already has a nice representation for associactions, namely the > assoc lists. However, they are a bit problematic, because they are > ordered by nature and hence there's not much one can do with their > linear access time.
When we are talking about the representation of a mapping, it will be a full content dump, thus O(n) regardless. You don't gain anything by adding substructure to the assoc list. When you read in the collection, you can put it in the data structure of your choice (with alist->hash-table, for example). Sexps are perfectly suitable to represent any imaginable data. Circular sexps create funny effects in guile, though. Try inputting '(1 . #0#) to the (guile-1.8) reader. Unfortunately, even (define a '(1 . #0#)) fails to finish. Compare this with elisp, which is perfectly happy with: (setq a '#0=(1 . #0#)) Marko