к
Size: a a a
MK
KV
KV
к
к
KV
AA
AA
> ([Left 1, Right (Just 2), Right Nothing]::[Either Int (Maybe Int)]) ^.. each . ((_Right . _Just) `_` _Left) :: [Int]
[("foo", Just (1::Int)),("bar", Nothing),("baz", Just 2)] ^.. each . _ _Just :: [(String, Int)]к
λ> case "abc" of (x :: a) -> print $ typeRep @a
[Char]KV
к
> ([Left 1, Right (Just 2), Right Nothing]::[Either Int (Maybe Int)]) ^.. each . ((_Right . _Just) `_` _Left) :: [Int]
[("foo", Just (1::Int)),("bar", Nothing),("baz", Just 2)] ^.. each . _ _Just :: [(String, Int)]к
KV
KV
KV