On Wed, 24 Jul 2019 10:58:12 -0400, Mario Carneiro <[email protected]> wrote: > The list of lisp definitions can be searched and indexed just as well as > MM0 definitions. I was hoping to get to this today, but instead I ended up > writing language documentation: > > https://github.com/digama0/mm0/blob/master/mm0-hs/mm1.md
May I suggest supporting the syntax of at least simple neoteric expressions of Scheme SRFI 105 ( https://srfi.schemers.org/srfi-105/srfi-105.html )? This would mean the syntax reader would transform: e(...) ⇒ (e ...) This means that if you read an atom and it has a "(" without a space before it, treat the preceding atom as the first element in a list. Examples: cos(x) ⇒ (cos x), f(a b) ⇒ (f a b), exit() ⇒ (exit), and read(. options) ⇒ (read . options) This means you can use Lisp/Scheme while using a notation that looks a little more conventional. I, at least, would prefer to work in that format. That would let you write this: (def (fact x) (if (= x 0) 1 (* x (fact (- x 1))))) as: def(fact(x) if(=(x 0) 1 *(x fact(-(x 1))))) Also: May I suggest that "do blocks" use '['...']' or '('...')' instead? It'd be nice to be able to use [] and {} for other purposes, and it doesn't appear that curly braces have to be used for that singular case. In particular, my "curly-infix" notation uses {}, and it'd be nice to be able to add that later. In that notation "{..}" is a way to state a list in infix order, so you can express the same thing as: def(fact(x) if({x = 0} 1 {x * fact{x - 1}})) --- David A. Wheeler -- You received this message because you are subscribed to the Google Groups "Metamath" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/metamath/E1hqOri-00043j-TG%40rmmprod07.runbox.
