Pascals triangle | Refactored generate_rows