playing with >=>

Apparently in haskell if you teach a man to fish, he'll write
more pointfree code.
This commit is contained in:
Joey Hess 2011-10-31 23:39:55 -04:00
parent 3d2a9f8405
commit c643136e32
4 changed files with 7 additions and 6 deletions

View file

@ -69,7 +69,7 @@ performBare key backend = check
]
check :: [Annex Bool] -> CommandPerform
check s = sequence s >>= dispatch
check = sequence >=> dispatch
where
dispatch vs
| all (== True) vs = next $ return True