Hlint: Error: Use concatMap
This commit is contained in:
parent
f51083c1ff
commit
5c687ab275
@ -33,7 +33,7 @@ accountNameLevel a = length (filter (==acctsepchar) a) + 1
|
||||
|
||||
-- | ["a:b:c","d:e"] -> ["a","a:b","a:b:c","d","d:e"]
|
||||
expandAccountNames :: [AccountName] -> [AccountName]
|
||||
expandAccountNames as = nub $ concat $ map expand as
|
||||
expandAccountNames as = nub $ concatMap expand as
|
||||
where expand = map accountNameFromComponents . tail . inits . accountNameComponents
|
||||
|
||||
-- | ["a:b:c","d:e"] -> ["a","d"]
|
||||
|
||||
@ -58,7 +58,7 @@ addTimeLogEntry tle l0 = l0 { open_timelog_entries = tle : open_timelog_entries
|
||||
|
||||
rawLedgerTransactions :: RawLedger -> [Transaction]
|
||||
rawLedgerTransactions = txnsof . ledger_txns
|
||||
where txnsof ts = concat $ map flattenLedgerTransaction $ zip ts [1..]
|
||||
where txnsof ts = concatMap flattenLedgerTransaction $ zip ts [1..]
|
||||
|
||||
rawLedgerAccountNamesUsed :: RawLedger -> [AccountName]
|
||||
rawLedgerAccountNamesUsed = accountNamesFromTransactions . rawLedgerTransactions
|
||||
|
||||
Loading…
Reference in New Issue
Block a user