penny-0.24.0.0: Extensible double-entry accounting system

Safe HaskellSafe-Inferred

Penny.Lincoln.Serial

Synopsis

Documentation

serialItems :: (Serial -> a -> b) -> [a] -> [b]Source

serialSomeItems :: (a -> Either b (Serial -> b)) -> [a] -> [b]Source

serialNestedItemsSource

Arguments

:: Traversable f 
=> (a -> Either b (f c, Serial -> c -> d, f d -> b))

When applied to each item, this function returns Left if the item does not need a serial, or Right if it has items that need serials. In the Right is the container with items that need serials, the function that applies serials to each item, and a function to re-wrap the container with the serialed items.

-> [a] 
-> [b] 

Adds serials to items that are nested within other items.