Arc Forumnew | comments | leaders | submitlogin
A bug in assign?
5 points by zhtw 5294 days ago | 2 comments
Arc doesn't compain about 0 args in assign form. But what it returns, I guess, is something unintentional:

  arc> (assign)
  #<void>
Even if it was on purpose I might be able to assign this to a variable as well, but I can't:

  arc> (assign x (assign))
  Error: "begin: bad syntax (empty form) in: (begin)"


3 points by lg 5293 days ago | link

That's a mzscheme thing, I guess it's what it prints when the expression has no return value? (assign) gets turned into

  (eval `(begin))
and if you type that at the mzscheme prompt, it prints nothing; if you type

  (write (eval `(begin)))
as arc does, it prints that weird void.

-----

3 points by zhtw 5293 days ago | link

Yeah, but shouldn't it be changed to nil?

  (define (ac-set x env)
    (if (null? x)
       (list 'quote 'nil)
       `(begin ,@(ac-setn x env))))
I realize that it's not very important but still it's a bug. No?

-----