Implement loop lib.