An Agda version for "Stop when you are almost-full"