From b7701909429137b99e3319c033dc26fbc5bf105e Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 2 Sep 2015 16:20:41 -0700 Subject: [PATCH] lib: clarify flattenAccounts --- hledger-lib/Hledger/Data/Account.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hledger-lib/Hledger/Data/Account.hs b/hledger-lib/Hledger/Data/Account.hs index 970439916..1dafc7e14 100644 --- a/hledger-lib/Hledger/Data/Account.hs +++ b/hledger-lib/Hledger/Data/Account.hs @@ -169,10 +169,10 @@ pruneAccounts p = headMay . prune -- | Flatten an account tree into a list, which is sometimes -- convenient. Note since accounts link to their parents/subs, the --- account tree remains intact and can still be used. It's a tree/list! +-- tree's structure remains intact and can still be used. It's a tree/list! flattenAccounts :: Account -> [Account] flattenAccounts a = squish a [] - where squish a as = a:Prelude.foldr squish as (asubs a) + where squish a as = a : Prelude.foldr squish as (asubs a) -- | Filter an account tree (to a list). filterAccounts :: (Account -> Bool) -> Account -> [Account]