generator/for-comprehension example for scala