Advertisement
Guest User

Which is more readable? A or B

a guest
Mar 23rd, 2014
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.53 KB | None | 0 0
  1. A:
  2.     val configItemFuture: EitherT[Future, Errors, ConfigItem[Value]] =
  3.       for {
  4.         items <- check().liftM[ErrorsOrT]
  5.         item <- EitherT(requireConfig(name, items).point[Future])
  6.         _ <- EitherT(verifyChangeNeed(item).point[Future])
  7.       } yield item
  8.  
  9. B:
  10.  
  11.       val configItemFuture: EitherT[Future, Errors, ConfigItem[Value]] =
  12.        EitherT {
  13.          for (items <- check()) yield for {
  14.            item <- requireConfig(name, items)
  15.            _ <- verifyChangeNeed(item)
  16.          } yield item
  17.        }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement