Arc Forumnew | comments | leaders | submitlogin
restartable: modifier
5 points by almkglor 6023 days ago | 1 comment
Being utterly bored once again, I have created the restartable: modifier:

  (mac restartable body
    `(let restart nil
       (= restart (ccc [fn () (_ restart)]))
       ,@body))
Basically, you can use this modifier to create a control structure that you can restart:

  (restartable:do
    (do-something)
    (if (some-fail) (restart))
    (commit-what-was-done))
Dubious usage, of course ^^


1 point by stefano 6021 days ago | link

The ultimate goto! :)

-----