use take-iterator instead of take-generator