modal/examples/lisp.modal

13 lines
347 B
Plaintext
Raw Normal View History

2024-04-01 22:26:29 -04:00
define nil ()
define (pair (?x) (?y)) ((?x ?y))
define (first (?x ?y)) (?x)
define (second (?x ?y)) (?y)
define (quote ?x) (quote ?x)
define (if ?c ?t else ?f) (if/else ?c quote ?t quote ?f)
define (if/else (true) quote (?t) quote (?f)) (?t)
define (if/else (false) quote (?t) quote (?f)) (?f)
define (hello) (bye)
pair (pair (foo) (nil)) (baz)