Seems to be getting the scope right. Flatten a list example now works. Debugging for apply.