Arc Forumnew | comments | leaders | submitlogin
2 points by conanite 5633 days ago | link | parent

I know this is outrageous nitpicking, but there's a possible comment inaccuracy in ac.scm, in (define (ac s env) ...

  ; the next two clauses could be removed without changing semantics
  ((eq? (xcar (xcar s)) 'compose) (ac (decompose (cdar s) (cdr s)) env))
  ((eq? (xcar (xcar s)) 'complement) 
   (ac (list 'no (cons (cadar s) (cdr s))) env))
Expanding fn-position compose and complement in ac enable composition of macros. (rev:accum a (a 1) (a 2)) works for example although accum is a macro. I tried removing the removable clauses from ac, and indeed the rev:accum example no longer works.


1 point by conanite 5633 days ago | link

another example:

  arc> (assign foo '(a b c))
  (a b c)
  arc> (pop:cdr foo)
  b
  arc> foo
  (a c)
Without the compose/complement clauses in ac.scm:

  arc> (pop:cdr foo)
  Error: "Can't set reference  #<procedure:apply> #<procedure:cdr> (c . nil)"

-----

2 points by pg 5633 days ago | link

Good point; thanks.

-----