Merge pull request #5 from tomjaguarpaw/patch-1

Remove duplication
This commit is contained in:
Andrew Martin 2017-02-24 17:37:31 -05:00 committed by GitHub
commit e0a0f66a43

View File

@ -216,12 +216,7 @@ replaceWhen ::
-> (a -> Bool) -- ^ Row predicate
-> Colonnade f a c -- ^ Original 'Colonnade'
-> Colonnade f a c
replaceWhen newContent p (E.Colonnade v) = E.Colonnade
( Vector.map
(\(E.OneColonnade h encode) -> E.OneColonnade h $ \a ->
if p a then newContent else encode a
) v
)
replaceWhen = modifyWhen . const
-- | Augment a 'Colonnade' with a header spans over all of the
-- existing headers. This is best demonstrated by example.