Arc Forumnew | comments | leaders | submitlogin
5 points by conanite 5758 days ago | link | parent

it seems ssyntax only works on symbols (see http://arclanguage.org/item?id=6387 )


1 point by PieSquared 5758 days ago | link

An unrelated question about the ':' syntax: does it really compose functions, or does it work with macros as well?

In other words, can I say

  (macro:function arguments)
or does it only work with functions?

-----

2 points by absz 5751 days ago | link

It's actually in-between:

  (f:g a b c)
becomes

  ((compose f g) a b c)
, which normally wouldn't work if f or g were a macro; however, compose is special-cased in ac.scm so that in the head of a list, this becomes

  (f (g a b c))
. Thus, : only works with macros at the head of a list. You can't do

  (f a b macro:function c)

.

-----

1 point by tokipin 5757 days ago | link

it works with macros as well, which makes for a convenient "modifier" syntax

example: http://arclanguage.com/item?id=4436

-----

1 point by almkglor 5757 days ago | link

The "ultimate" modifier being p-m:

http://arclanguage.org/item?id=2556

-----