Comment

Comment by BenFrantzDale

For list comprehension, we have (C++23): `std::ranges::to<std::vector>(items | std::views::filter(shouldInclude) | std::views::transform(f))` it’s not quite `[f(x) for x in items if shouldInclude(x)]` but it’s the same idea.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton