Open jwaldmann opened 1 month ago
I sometimes want to convert between R.Relation a b and [[Bit]]. It's easy to write
R.Relation a b
[[Bit]]
rows b = let ((u,l),(o,r)) = R.bounds b in flip map (A.range (u,o)) $ \ x -> flip map (A.range (l,r)) $ \ y -> b R.! (x,y)
but it could be in the library.
Actually, it already is, sort of, but hidden in the implementation of https://hackage.haskell.org/package/ersatz-0.5/docs/src/Ersatz.Relation.Data.html#table
I sometimes want to convert between
R.Relation a b
and[[Bit]]
. It's easy to writebut it could be in the library.
Actually, it already is, sort of, but hidden in the implementation of https://hackage.haskell.org/package/ersatz-0.5/docs/src/Ersatz.Relation.Data.html#table