Arc Forumnew | comments | leaders | submitlogin
Between: Like each, with also doing something in between each action (awwx.ws)
6 points by aw 5488 days ago | 4 comments


2 points by proponent 5481 days ago | link

Well, I can't argue with Merriam-Webster! Now, can anyone think of a macro for which the name "among" would be appropriate?

-----

2 points by aw 5481 days ago | link

  (mac among (var expr within . body)
    `(between ,var ,expr (repeat (rand 4) ,within)
       ,@body))

  arc> (among x (range 0 10) (pr "*")
         (pr x))
  0***12*3***4***5*67**8*9*10nil

-----

1 point by proponent 5483 days ago | link

I like it. Let me suggest that it be renamed "among" as, grammatically speaking, "between" applies to two things while "among" applies to three or more.

-----

3 points by aw 5483 days ago | link

"There is a persistent but unfounded notion that between can be used only of two items and that among must be used for more than two. Between has been used of more than two since Old English; it is especially appropriate to denote a one-to-one relationship, regardless of the number of items."

http://www.merriam-webster.com/dictionary/Between

-----