Examples

  • S = %l x:Int. x + 1
    S : Int -> Int
  • twice = %l f:Int -> Int. %l y : Int . f ( f ( y ) ) twice : ( Int -> Int ) -> Int -> Int

Application

  • S 0 = 1 \e Int
  • twice ( S ) = %l x. S S x \e Int -> Int

slide: Subtypes -- examples