V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
xieyuheng
V2EX  ›  数学

一个 Lambda 演算的实现

  •  
  •   xieyuheng · 2022-03-21 18:12:57 +08:00 · 1057 次点击
    这是一个创建于 739 天前的主题,其中的信息可能已经有所发展或是发生改变。

    项目仓库:https://github.com/cicada-lang/lambda

    例子:

    (define (true t f) t)
    (define (false t f) f)
    
    (define (if p t f) (p t f))
    
    (define (and x y) (if x y false))
    (define (or x y) (if x true y))
    (define (not x) (if x false true))
    
    (and true false)
    (not (not (or true false)))
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2623 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 15:34 · PVG 23:34 · LAX 08:34 · JFK 11:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.