Arc Forumnew | comments | leaders | submitlogin
1 point by Pauan 4849 days ago | link | parent

I just had a fun time tracking down what I thought was a bug, but actually wasn't. If you decide to use Arubic and then try to import something, you may end up with an error similar to this:

  > (import-as pprint "arc3.1/pprint.arc")
  Error: can't understand fn arg list 2
What's happening is that it encountered something like the following:

  (map (fn (e) (prn) (ppr e (+ col 2)))
       (nthcdr (1+ n) expr))
But keep in mind Arubic changes the meaning of "map", "all", "some", etc. which then causes the error. The correct thing to do then is to import it in Arc's namespace, rather than Arubic's namespace:

  > (w/arc3 (import-as pprint "arc3.1/pprint.arc"))
  nil

  > pprint
  #<namespace>

  > ppr
  Error: undefined variable: ppr

  > pprint!ppr
  #<fn>

  > (pprint!ppr '(1 2 3 4 5))
  (1 2 3 4 5)nil
I also have an idea for how I can get it to import correctly into Arubic's namespace, without the error.