Like each, with also doing something in between each action

(mac between (var expr within . body)
  (w/uniq first
    `(let ,first t
       (each ,var ,expr
         (unless ,first ,within)
         (wipe ,first)

I’ve been running into this pattern in my code often enough that I thought I’d make it into a macro.

arc> (between a '(1 2 3 4) (pr ",")
       (pr a))

Get this hack

Download between0.arc.

Or, using the hackinator:

hack \


This code may be redistributed and modified under the same terms as Arc itself.

Contact me

Twitter: awwx
Email: andrew.wilcox [at]