is there a way to exit a repeat in the middle of it's iteration

Need help.
something like:

repeat on list
if item = something then
exit
end if
end repeat

I think this code won’t work, but wanted to explain what I meant

repeat
	if i_want_to_stop then
		exit repeat
	end if
end repeat

I understand how this works for a variable conditional statement, but I cannot get this to work on quit. Ive tried every combination of on’s and exit’s but it never works.

repeat
–scripted stuff here
end repeat

on quit
exit repeat
contiue quit
end quit

Any advice on how to quit while going through a repeat?

try

set runn_it to true
repeat while runn_it is true
	--scripted stuff here
end repeat

on quit
	set runn_it to false
	contiue quit
end quit