Closed jar398 closed 5 years ago
Small note: No need to quote the empty map literal. (= '{} {}) ; true
In clojure. I quote it as a metaprob habit. (maybe we should change metaprob.)
(quote ...) is not understood by the Metaprob (definitional) interpreter, is it?
I think we should discuss this issue at some point — like, should quote convert Metaprob source into its trace representation? — and also the question of whether Clojure-written macros can or should be made to work in (interpreted) Metaprob code.
Absolutely right! Totally forgot.
Maybe this test should be written some other way. (trace)
would be right if we (that is, I) weren't preserving the option of reverting to (trace)
evaluating to ()
some time in the future. Maybe there's some expression involving clojure core functions that yields an empty hashmap? Can't think of one off the top of my head, but I expect there is.
Or, quote
could be implemented. That's a @vkmvkmvkmvkm question. Fortunately it doesn't affect the interpreter, since it can be elminated in the 'parser' (syntax.clj).
(length '{})
needs to yield 0. I don't think there's a test for this in sequence_test.clj. I don't know whether the test would succeed; if notlength
should be fixed.