pablo_escoberg has quit [Ping timeout: 250 seconds]
pablo_escoberg has joined #picolisp
mario-goulart has quit [Server closed connection]
mario-goulart has joined #picolisp
pablo_escoberg has quit [Ping timeout: 250 seconds]
pablo_escoberg has joined #picolisp
pablo_escoberg has quit [Ping timeout: 250 seconds]
pablo_escoberg has joined #picolisp
clacke has joined #picolisp
seninha has joined #picolisp
seninha has quit [Remote host closed the connection]
seninha has joined #picolisp
pablo_escoberg has quit [Ping timeout: 250 seconds]
BitPuffi` has joined #picolisp
pablo_escoberg has joined #picolisp
seninha has quit [Quit: Leaving]
BitPuffi` has quit [Ping timeout: 246 seconds]
pablo_escoberg has quit [Quit: Leaving.]
pablo_escoberg has joined #picolisp
pablo_escoberg has quit [Remote host closed the connection]
pablo_escoberg has joined #picolisp
pablo_escoberg has quit [Quit: Leaving.]
pablo_escoberg has joined #picolisp
pablo_escoberg has quit [Quit: Client closed]
pablo_escoberg has joined #picolisp
<pablo_escoberg>
Sorry if this comes through twice: Another newbie question: Is there a standard method for passing addressable kv pairs (e.g. hashes/dictionaries) to functions? I tried passing a symbol with properties, but can't quite figure out how to do that, plus it may not be the best fit anyway. I could use a list of cons pairs, but then I have to
<pablo_escoberg>
search through them. The solution I'm looking at now is an options object, but that strikes me as rather inelegant.
<abu[7]>
If the list is not too long, the standard Lisp way is association lists
<abu[7]>
assoc, asoq, rassoc, rasoq
<abu[7]>
It is pretty efficient and flexible
<abu[7]>
rassoc and rasoq are also useful in various contexts because they return a 'var'
<abu[7]>
: (setq L '((1 . a) (2 . b) (3 . c)))
<abu[7]>
-> ((1 . a) (2 . b) (3 . c))
<abu[7]>
: (inc (rasoq 'c L))
<abu[7]>
-> 4
<abu[7]>
: L
<abu[7]>
-> ((1 . a) (2 . b) (4 . c))
pablo_escoberg has quit [Quit: Client closed]
<abu[7]>
'get' and 'put' also operate on 'rasoq' lists
pablo_escoberg has joined #picolisp
<pablo_escoberg>
OK, that will work. Thanks much. I seriously don't know how I missed ALL of those in the docs :(.