trans :: (b -> a) -> (c -> a -> c) -> c -> b -> c
trans f reduce c = reduce c . f
mapping :: (a -> b) -> Transducer b a mapping f xf r a = xf r (f a)