penny-lib-0.2.0.0: Extensible double-entry accounting system - library

Safe HaskellSafe-Infered

Penny.Lincoln.Family.Family

Synopsis

Documentation

data Family p c Source

A Family has one parent (ah, the anomie, sorry) and at least two children.

Constructors

Family 

Fields

parent :: p
 
child1 :: c
 
child2 :: c
 
children :: [c]
 

Instances

(Eq p, Eq c) => Eq (Family p c) 
(Show p, Show c) => Show (Family p c) 

mapChildrenM :: Monad m => (a -> m b) -> Family p a -> m (Family p b)Source

Maps over all children in a monad, in order starting with child 1, then child 2, then the children in the list from left to right.

mapChildren :: (a -> b) -> Family p a -> Family p bSource

Maps over all children, in order starting with child 1, then child 2, then the children in the list from left to right.

mapParentM :: Monad m => (a -> m b) -> Family a c -> m (Family b c)Source

Maps over the parent in a monad.

mapParent :: (a -> b) -> Family a c -> Family b cSource

Maps over the parent.