@@ -52,8 +52,22 @@ bindEitherTable query e@(EitherTable input a i) = do
52 EitherTable (input <> output) (bool a a' (isRightTable e)) b
52 EitherTable (input <> output) (bool a a' (isRightTable e)) b
55−-- | Extend an 'EitherTable' with queries for both 'leftTable' and
55+-- | @bitraverseEitherTable f g x@ will pass all @leftTable@s through @f@ and
56−-- 'rightTable'.
56+-- all @rightTable@s through @g@. The results are then lifted back into
57+-- @leftTable@ and @rightTable@, respectively. This is similar to 'bitraverse'
64+-- x <- values (map lit [ Left True, Right (42 :: Int32) ])
65+-- bitraverseEitherTable (\y -> values [y, not_ y]) (\y -> pure (y * 100)) x
57bitraverseEitherTable :: ()
71bitraverseEitherTable :: ()
58 => (a -> Query c)
72 => (a -> Query c)
59 -> (b -> Query d)
73 -> (b -> Query d)