To repeat my comments from earlier (http://arclanguage.org/item?id=17074), calling 'join on lists is not quite the same as calling '+ on the same lists. The results are 'iso to each other, but not 'is .
More confusingly, it also changes the cons cells inside the lists:
arc> (= l (list (list 1)))
((1))
arc> (is (car (+ l)) (car (join l)))
nil
arc> (iso (car (+ l)) (car (join l)))
t
>Is there also a function for adding two hash tables?
Hash tables are missing a lot of helper functions, yes. There's no built-in way (that I know of) of combining them, although writing one isn't hard -- you just have to decide what to do about collisions. I just took a few minutes and wrote one up. I deal with collisions by letting the earlier hash win. My code:
Note: somehow, I broke 'assert-same. Not sure why. I'll fix it later today; I don't have the time right now to make sure it's done properly. If you pull the default branch of my repo, and these tests don't work, bug me until I fix it.
Ugh, I'm past the edit time. Of course one wouldn't expect `(is (+ l) (join l))` to be 't, because that's the definition of 'is. (even `(is (list 1) (list 1))` returns 'nil). But the second part is bad, I think: the elements inside l should stay the same.
I blame not really hacking in Arc much lately. I haven't really been up for programming much of anything.
"But the second part is bad, I think: the elements inside l should stay the same."
I agree. I really think this is a simple coding mistake in ac.scm. I talk more about this here, a reply to that thread you linked to: http://arclanguage.org/item?id=17114
I completely forgot about this difference between + and 'join after that thread, and I don't remember encountering it before that either. How fitting it's a testing framework that brings this bug to the surface! :-p