Advertisement
Guest User

Untitled

a guest
Mar 30th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. λ> data S = X | Y deriving (Eq, Show)
  2. λ> data T = W | Z deriving (Eq, Show)
  3. λ> s2t s = case s of X -> W; Y -> Z
  4. λ> t2s t = case t of W -> X; Z -> Y
  5. λ> s2t' s = case s of X -> Z; Y -> W
  6. λ> t2s' t = case t of Z -> X; W -> Y
  7. λ> ( s2t (t2s W) == W , s2t (t2s Z) == Z , t2s (s2t X) == X , t2s (s2t Y) == Y )
  8. (True,True,True,True)
  9. λ> ( s2t' (t2s' W) == W , s2t' (t2s' Z) == Z , t2s' (s2t' X) == X , t2s' (s2t' Y) == Y )
  10. (True,True,True,True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement