Arc Forumnew | comments | leaders | submitlogin
3 points by pau 6102 days ago | link | parent

File 'a.arc':

  (set spam 1)
  (def myfun (x) (prn x))
File 'b.arc':

  ;; Uses 'a'
  (use 'a)
  (a@myfun "hi!")
File 'c.arc':

  ;; Uses all in 'a'
  (use* 'a)
  (myfun "hy!")
File 'd.arc':

  ;; Use 'a' as 'z'
  (useas 'z 'a)
  (z@myfun "ho!")
In Arc's repl:

  arc> (use 'a)
  t
  arc> a@spam
  1
  arc> (set a@spam 5)
  5
  arc> (use 'a)
  t
  arc> a@spam
  5
  arc> (use 'd)
  ho!
  t
  arc> (use 'b)
  hi!
  t