Arc Forumnew | comments | leaders | submitlogin
1 point by wfarr 5847 days ago | link | parent

I believe so.

Because the 'def macro uses '= to define functions, variables and functions are occupying the same namespace (sort of).

For example:

  (def foo () (prn "bar"))
is expanded to:

  (= foo (fn () (prn "bar")))
For example:

  > (def foo () (prn "bar"))
  #<procedure: foo>
  > (= foo "foo")
  "foo"
  > (foo)
  Error: "procedure ...r/src/arc/ac.scm:1224:11: expects 2 arguments, given 1: \"foo\""
Make sense?

Though, that may not affect your usage here since power is just an argument and not a variable itself.