(module loop_smoke (fn count_to (doc "Iter it.1 — single counted loop; counts i up to n and returns n. Iter it.2: loop-bearing ⇒ !Diverge (D2).") (type (fn-type (params (con Int)) (ret (con Int)) (effects Diverge))) (params n) (body (loop ((var i (con Int) 0)) (if (app == i n) i (recur (app + i 1)))))))