Notice the 'edit' I exported earlier could be reused to simplify the w implementation of the proof that Box is a transitive relation

This commit is contained in:
Tissevert 2020-02-24 21:39:02 +01:00
parent 1a70f2972b
commit 30fece6537
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
dist*/
.ghc.environment.*
cabal.project.local

View File

@ -25,7 +25,7 @@ modifyAt i f = get >>= edit i f >>= put
instance (Box m i a b, Box m j b c) => Box m (i, j) a c where
r (i, j) a = r i a >>= r j
w (i, j) a c = r i a >>= flip (w j) c >>= w i a
w (i, j) a c = edit i (flip (w j) c) a
infixr 6 .@
(.@) :: a -> b -> (a, b)