Comments (5)
Thanks for the report! I can't check it out right now, but I'll do so soon 👍.
from lambda_calculus.
from lambda_calculus.
Disclaimer: I haven't played with lambda calculus for a good while now, so please take this with a grain of salt 😃.
I think it's just the fact that you need to add some extra explicit parentheses, otherwise the parser will automatically fold/collapse some of the sub-expressions (as suggested by the results of your parsing); the following seems to do the trick:
let expr_a = parse(r#"\a. (a (\b. (\c. (c (\d. (\e. (e d)))))))"#, Classic).unwrap();
let expr_b = parse(r#"\a. (a (\b. (\c. (c b))))"#, Classic).unwrap();
assert_eq!(beta(app(expr_a.clone(), expr_b.clone()), NOR, 0), expr_b);
assert_eq!(beta(app(expr_b.clone(), expr_a.clone()), NOR, 0), expr_a);
from lambda_calculus.
from lambda_calculus.
Glad to hear it; I'll close the issue then 👍.
from lambda_calculus.
Related Issues (7)
- Some CallByValue and HybridApplicative β-reductions with the Z combinator end up in an endless loop HOT 1
- 2.0.0 API changes HOT 11
- Encodings 2.0 HOT 3
- Not all list 2.0 function doctests are compatible with all numeral encodings HOT 7
- Make PRETTY_LAMBDA changeable outside the crate HOT 3
- Succ and pred in Mogensen's binary encoding fail HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lambda_calculus.