Arc Forumnew | comments | leaders | submitlogin
2 points by sacado 6137 days ago | link | parent

I gave a solution at http://arclanguage.org/item?id=4430 . It invloves only ccc (Arc's version of call-with-current-continuation) :

  (def a (return)
    (each i xs
      (if ( ... )
        (return i)))
    nil)

  arc> (ccc a)
  1
This is a very low-level solution, if you want to put your hand into axioms. almkglor's solutions, based on point & breakable macros (from Anarki) are much cleaner, even if they just expand in the above code (or something very close).


3 points by lojic 6137 days ago | link

Just to clarify, point is in Arc and doesn't require Anarki.

-----