combine journal updates with foldl' instead of foldr
on general principles, even though it makes no measurable difference
This commit is contained in:
parent
9a239789fa
commit
33b7c91e20
@ -79,7 +79,7 @@ parse _ = -- trace ("running "++format++" reader") .
|
||||
|
||||
-- | Flatten a list of JournalUpdate's into a single equivalent one.
|
||||
combineJournalUpdates :: [JournalUpdate] -> JournalUpdate
|
||||
combineJournalUpdates us = liftM (foldr (flip (.)) id) $ sequence us
|
||||
combineJournalUpdates us = liftM (foldl' (flip (.)) id) $ sequence us
|
||||
|
||||
-- | Given a JournalUpdate-generating parsec parser, file path and data string,
|
||||
-- parse and post-process a Journal so that it's ready to use, or give an error.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user