;; The hole a capture could otherwise be laundered through, and the reason ;; "the result of a call is clean" is a rule and not a hope. ;; ;; [sneak]'s literal captures [g], so its body holds a *copy* of a function ;; value that may itself carry an environment — and the copy is read out of an ;; environment, which is the one aggregate a function value is ever stored in. ;; If a copy read back out were treated as clean, the literal could return it, ;; the return would arrive at [sneak]'s caller as an ordinary call result, and ;; a capturing value would be out of the frame that owns it with nothing ;; having refused anything. ;; ;; So a function value read out of a struct, a case or a pointer is suspect, ;; and the refusal lands inside the lifted body where the return is written. (defn getf [f (Fn [] (Fn [] i32))] (Fn [] i32) (f)) (defn sneak [g (Fn [] i32)] (Fn [] i32) (getf (fn [] g))) (defn main [] i32 0)