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

@ -83,7 +83,7 @@ keyValue size file = do
{- Extension preserving keys. -}
keyValueE :: SHASize -> FilePath -> Annex (Maybe Key)
keyValueE size file = keyValue size file >>= maybe (return Nothing) addE
keyValueE size file = keyValue >>= maybe (return Nothing) addE
where
addE k = return $ Just $ k
{ keyName = keyName k ++ extension