I have a [(a, Maybe b)]
, and want to obtain a [(a, b)]
, with all pairs where the second element was Nothing
filtered out.
Is there a concise way to describe this operation using lens?
Notwithstanding the ingeniousity of the Lenses, the follwoing would probably be the mark for conciseness:
[ (a, b) | (a, Just b) <- list ]
(Not to speak of readability.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With