Arc Forumnew | comments | leaders | submitlogin
2 points by CatDancer 5649 days ago | link | parent

Very nice! For example, my "many" parser combinator uses 'afn:

  (def many (parser)
    (fn (p)
      ((afn (p a)
         (iflet (s2 r) (parser p)
           (self s2 (cons r a))
           (return p rev.a)))
       p nil)))
using 'afnwith:

  (def many (parser)
    (fn (p)
      (afnwith (p p a nil)
        (iflet (s2 r) (parser p)
          (self s2 (cons r a))
          (return p rev.a)))))
I like having a form in which I don't have to use the double parentheses.