lib: clarify flattenAccounts
This commit is contained in:
parent
b8d75b7728
commit
b770190942
@ -169,7 +169,7 @@ pruneAccounts p = headMay . prune
|
|||||||
|
|
||||||
-- | Flatten an account tree into a list, which is sometimes
|
-- | Flatten an account tree into a list, which is sometimes
|
||||||
-- convenient. Note since accounts link to their parents/subs, the
|
-- 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 :: Account -> [Account]
|
||||||
flattenAccounts a = squish a []
|
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)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user