Fix code style
This commit is contained in:
parent
45c618b413
commit
6b680c9887
1 changed files with 6 additions and 4 deletions
|
@ -61,10 +61,12 @@ applyJoinTemplateList delimiter tpl context items = do
|
|||
-- @year-month-day-title.extension@ naming scheme -- as is the convention in
|
||||
-- Hakyll.
|
||||
chronological :: MonadMetadata m => [Item a] -> m [Item a]
|
||||
chronological = sortByM $ getItemUTC defaultTimeLocale . itemIdentifier
|
||||
where sortByM :: (Monad m, Ord k) => (a -> m k) -> [a] -> m [a]
|
||||
sortByM f xs = liftM (map fst . sortBy (comparing snd)) $
|
||||
mapM (\x -> liftM (x,) (f x)) xs
|
||||
chronological =
|
||||
sortByM $ getItemUTC defaultTimeLocale . itemIdentifier
|
||||
where
|
||||
sortByM :: (Monad m, Ord k) => (a -> m k) -> [a] -> m [a]
|
||||
sortByM f xs = liftM (map fst . sortBy (comparing snd)) $
|
||||
mapM (\x -> liftM (x,) (f x)) xs
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- | The reverse of 'chronological'
|
||||
|
|
Loading…
Reference in a new issue