;; loop, broken by (return)
(setq
  looped-loop
  (let (i 0)
    (loop
      (if (< i 10)
        (setq i (+ i 1))
        (break)
        )
      )
    i
    )
  )

;; while, broken prematurely
(setq
  looped-while
  (let (i 0)
    (while (< i 20)
      (setq i (+ i 1))
      (if (= i 10) (break))
      )
    i
    )
  )

;; while, broken by condition
(setq
  looped-while-full
  (let (i 0)
    (while (< i 10)
      (setq i (+ i 1))
      )
    i
    )
  )

;; All loops execute the same count of times
(assert (= looped-loop looped-while looped-while-full))
(print "Test succeeded")
