How about ```
for line in reader.lines().iter().take(line_count) {
    print(line);
}
```