Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 со любого шага, и различать их.
Add Comment
Please, Sign In to add comment