playing with >=>
Apparently in haskell if you teach a man to fish, he'll write more pointfree code.
This commit is contained in:
parent
3d2a9f8405
commit
c643136e32
4 changed files with 7 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue