Name

finish-if

Usage

loop clause

Syntax

(finish-if test)

Description

When used within the main body of a loop, transfers control to the finally clause of that loop if test is true.

user 1 > (loop
             (for i in '(1 2 3 a 5 6))
             (finish-if (symbol? i))
             (collecting i)
             (finally (collecting 999)))
it: #v(1 2 3 999)