Next Types Are Theorems; Programs Are Proofs 18

Pairs

       (1, "foo")             :: (Int, String)
       (True, [])             :: (Bool, [a])
       (1, (True, "foo"))     :: (Int, (Bool, String))
         (x, y)     ::   (a, b)
         fst z      ::   a
         snd z      ::   b

Next Next