This is a bit of a long lambda for use in one line like this. If it were me, I'd probably pull it out either into a local function, or into a top-level function.