Embedding higher kinded types (monads!) into the untyped lambda calculus

前端 未结 3 904
谎友^
谎友^ 2021-02-04 17:58

It\'s possible to encode various types in the untyped lambda calculus through higher order functions.

Examples:
zero  = λfx.      x
one   = λfx.     fx
two   = λ         


        
3条回答
  •  别跟我提以往
    2021-02-04 18:15

    You are mixing up the type level with the value level. In untyped lambda calculus there are no monads. There can be monadic operations (value level), but not monads (type level). The operations themselves can be the same, though, so you don't lose any expressive power. So the question itself doesn't really make sense.

提交回复
热议问题