Arc Forumnew | comments | leaders | submitlogin
3 points by almkglor 5875 days ago | link | parent

Similar to the 'breakable modifier:

  (breakable:map
    [when odd._
          (break _)]
    *list-of-numbers*)
Note however that the 'break function created by 'breakable is an early-out, i.e. it exits the 'breakable form.

I suggest you turn 'focus into say 'focusable so that the extra variable ref can be dropped and we can abuse the : syntax:

  (focusable:map
    [and odd._
         (or (no (focus))
              (< (focus) _))
         (focus _)]
    *list-of-numbers*)