Arc Forumnew | comments | leaders | submitlogin
1 point by randallsquared 6135 days ago | link | parent

The colon operator does work on macros, but not, currently, on anonymous functions. I'm not sure if there's a reason for that or if it's just a bug.

Note that you can chain together composed functions, so

    (a:b:c 'works)


1 point by randallsquared 6135 days ago | link

Hrm. Also, (|a:b| ...) works, but shouldn't.

-----

2 points by nostrademons 6134 days ago | link

It's because the ~: syntax is expanded at evaluation time, not at read-time. The Arc compiler looks at each symbol, and if it has one of those characters, it splits on the :, wraps in (compose ...), and adds a (complement ...) form every time the section begins with ~.

-----