Arc Forumnew | comments | leaders | submitlogin
6 points by nex3 6094 days ago | link | parent

2 can be pretty easily accomplished using defcall from Anarki:

  (defcall int (i fn)
    (reduce (fn (f fs) f:fs) (n-of i cdr)))


4 points by nex3 6094 days ago | link

Oops, stupid mistake. That should actually be

  (defcall int (i f)
    (reduce (fn (f fs) f:fs) (n-of i f)))

-----

1 point by eds 6092 days ago | link

This works, but do note that 'compose can take multiple arguments as in http://arclanguage.org/item?id=6121.

-----