(validator1 *> validator2)(a)
-
-
Replying to @dibblego
you mean it would be nicer if it worked this way too? asking b/c that code doesn't work
@puffnfresh @paul_snively@DanielaSfregola2 replies 0 retweets 0 likes -
(ReaderT(validator1) *> ReaderT(validator2))(a) // should work, if Scalaz works.
1 reply 0 retweets 0 likes -
it doesn't seem to work, but it maybe me. Could u provide a full working gist of that?
1 reply 0 retweets 0 likes -
1 reply 0 retweets 0 likes
-
Thanks!
1 reply 0 retweets 0 likes -
probably would write it more like: http://scastie.org/29064
1 reply 0 retweets 0 likes -
ok, and what would be the advantage compared to my original tweet version?
1 reply 0 retweets 0 likes -
Pass the argument once, not n times (although n=2 in your case) through a call tree.
1 reply 0 retweets 0 likes -
I'd rather use the following for this purpose: (validator1(_) andThen validator2)(a)
2 replies 0 retweets 0 likes
Maybe, but only when n=2 at depth=1, and the circumstances let it work out OK :)
-
-
:), anyway the purpose of the original tweet was to emphasize the abuse of |@| vs *>
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.