Arc Forumnew | comments | leaders | submitlogin
2 points by shader 5993 days ago | link | parent

I've already started on the math library, beginning with the gcd function.

Unfortunately, I'm not that good at arc yet. How do you make a function that will take 0 or more arguments, instead of requiring at least one?



8 points by cchooper 5993 days ago | link

Like this:

  (def foo args
    (prn args))

  (foo)
  => nil

  (foo 1)
  => (1)

  (foo 1 2)
  => (1 2)

-----