Arc Forumnew | comments | leaders | submitlogin
3 points by almkglor 5889 days ago | link | parent

Anarki supports multiple arguments too:

  (map [* _1 _2] '(1 2 3) '(4 5 6))
Note that this is currently bugged in Arc-F though. Will fix ^^.

The auto-gensyms thing looks cute. It might be possible to hack something like that, although it would require modifying the axiomatic quasiquote operator.

Basically:

  `(let foo# ,foo
     (do-some foo# foo#))
=>

  (quasiquote (let (unquote-uniq foo) (unquote foo)
                (do-some (unquote-uniq foo) (unquote-uniq foo))))
Then quasiquote has to expand to scheme style:

  (let ((gensym012032 (gensym)))
    (quasiquote (let (unquote gensym012032) (unquote foo)
                  (do-some (unquote gensym012032) (unquote gensym012032)))))
The recur bit is a lot like (afn () ... self)