Arc Forumnew | comments | leaders | submitlogin
3 points by rocketnia 4269 days ago | link | parent

The examples at arcfn say [do (prn ...) ...] and [w/link (pr ...) ...]. At some point you changed one of these to [ (prn ...)] for your example.


1 point by lark 4268 days ago | link

Thanks. I understand one should write:

  [do (prn "...")]
I support one shouldn't. The do should be implicit.

-----

2 points by Pauan 4268 days ago | link

The reason it does that is so that things like [+ _ 1] work. Under your suggestion, you would have to write [(+ _ 1)] which looks ugly.

Rather than using [(prn ...)] you can just use [prn ...]

---

Incidentally, using Arc/Nu, it's easy to make the square brackets behave the way you want them to:

  (mac square-brackets args
    `(fn (_) (do ,@args)))
I believe Anarki has something similar as well.

-----