YR
Size: a a a
YR
AV
AV
initialize f = unsafePerformIO $ do
once $ WSAStartup
return f
AV
AV
AA
> (Left a, Right b)^.alongside chosen chosen
(a,b)
> Left (Just 2) ^? without _Just _Right
Just (Left 2)
> Right (Right 3) ^? without _Just _Right
Just (Right 3)
> Left (Nothing) ^? without _Just _Right
Nothing
> Right (Left 3) ^? without _Just _Right
Nothing
AN
AN
AA
> [Left 1, Right (Just 2), Right Nothing] ^.. each . filteredBy ((_Right . _Just) `failing` _Left)
[Left 1,Right (Just 2)]
> [After "foo", Nodeps, Before "bar"] ^.. each . filteredBy (#_Before `failing` #_After)
[After "foo", Before "bar"]
AA
["foo", "bar"] получилось?AN
AA
> [Left 1, Right (Just 2), Right Nothing] ^.. each . ((_Right . _Just) `failing` _Left)
[1,2]
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)]AN
AV
AV
KV