Skip to content

Instantly share code, notes, and snippets.

@ivanovs-4
Last active January 12, 2018 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivanovs-4/30836f0becb67779758f18dce38c98bb to your computer and use it in GitHub Desktop.
Save ivanovs-4/30836f0becb67779758f18dce38c98bb to your computer and use it in GitHub Desktop.
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