Re: let assoc-set! append to the right

2016-01-29 Thread Urs Liska
Am 29.01.2016 um 10:29 schrieb David Kastrup: > Urs Liska writes: > >> Hi all, >> >> assoc-set! either replaces a value in an alist *in-place* or prepends a >> new pair if the key isn't present in the alist. >> However, I need a function the *appends* the entry if it is created newly. >> >> I ca

Re: let assoc-set! append to the right

2016-01-29 Thread David Kastrup
Urs Liska writes: > Hi all, > > assoc-set! either replaces a value in an alist *in-place* or prepends a > new pair if the key isn't present in the alist. > However, I need a function the *appends* the entry if it is created newly. > > I came up with swapping the first element to the end if assoc-

let assoc-set! append to the right

2016-01-29 Thread Urs Liska
Hi all, assoc-set! either replaces a value in an alist *in-place* or prepends a new pair if the key isn't present in the alist. However, I need a function the *appends* the entry if it is created newly. I came up with swapping the first element to the end if assoc-set! has modified the length of