Guest User

Untitled

a guest
Oct 5th, 2014
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. l1 :: (Prod (a1 -> a3) (a2 -> a3)) -> (Either a1 a2) -> a3
  2. l1 x x0 =
  3.   case x of {
  4.    Pair x1 x2 ->
  5.     case x0 of {
  6.      Left x3 -> x1 x3;
  7.      Right x3 -> x2 x3}}
  8.  
  9. l2 :: ((Either a1 a2) -> a3) -> Prod (a1 -> a3) (a2 -> a3)
  10. l2 x =
  11.   let {x0 = \x0 -> x (Left x0)} in
  12.   let {x1 = \x1 -> x (Right x1)} in Pair x0 x1
Advertisement
Add Comment
Please, Sign In to add comment