| 22 | using Texts = std::vector<std::string>; |
| 23 | |
| 24 | Lazy<Texts> ReadFile(const std::string &filename) { |
| 25 | Texts Result; |
| 26 | std::ifstream infile(filename); |
| 27 | std::string line; |
| 28 | while (std::getline(infile, line)) |
| 29 | Result.push_back(line); |
| 30 | co_return Result; |
| 31 | } |
| 32 | |
| 33 | Lazy<int> CountLineChar(const std::string &line, char c) { |
| 34 | auto ret = std::count(line.begin(), line.end(), c); |