lugfi / yaml.ar

yaml.ar is a runnable subset of yaml
https://yaml.ar
MIT License
5 stars 0 forks source link

risp-yaml:0.1.0 #2

Closed colltoaction closed 3 years ago

colltoaction commented 3 years ago

I decided to go with risp for now. a risp-yaml library is a great proof of concept for YAML as a lispy language.

Original below.


this was blatantly copy-and-pasted from https://christianpoveda.github.io/blog/untyped-lambda-calculus/

CC @christianpoveda


$ git clone https://github.com/colltoaction/yaml.yaml.git
$ cd yaml.yaml/interpreter.rust
$ cargo run -q
Original term: ((λx. (y x)) z)
After reduction: (y z)
colltoaction commented 3 years ago

I don't think the last pushed example is working properly:

$ cargo run -q
Original term: ((λa. (λb. a)) b)
After reduction: (λb. a)

Isn't it (λb. b) because a is replaced by b?