Last active
January 12, 2018 17:50
-
-
Save ivanovs-4/30836f0becb67779758f18dce38c98bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main :: IO () | |
main = do | |
exa <- makeEitherXA | |
case exa of | |
Left x -> undefined -- whatever | |
Right a -> do | |
eyb <-makeEitherYB a | |
case eyb of | |
Left y -> undefined --whatever | |
Right b -> do | |
ezc <- makeEitherZC a b | |
case ezc of | |
Left z -> undefined | |
Right c -> do | |
print c | |
-- Как такое композировать для произвольной глубины? | |
-- И хорошо бы ещё как-то собрать Left со любого шага, и различать их. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment