Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/glubs9/lambda-calculus-in-prolog
a small little lambda calculus interpreter i made in prolog after discovering dcgs
https://github.com/glubs9/lambda-calculus-in-prolog
Last synced: about 21 hours ago
JSON representation
a small little lambda calculus interpreter i made in prolog after discovering dcgs
- Host: GitHub
- URL: https://github.com/glubs9/lambda-calculus-in-prolog
- Owner: Glubs9
- Created: 2021-01-31T11:00:17.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-31T11:10:37.000Z (almost 4 years ago)
- Last Synced: 2024-11-09T13:40:40.694Z (about 2 months ago)
- Language: Prolog
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lambda-calculus-in-prolog
a small little lambda calculus interpreter i made in prolog after discovering dcgs# motivation
I was learning prolog and discovered dcgs and flipped my shit. craziest thing ever. so i wanted to test it out on a quick little program and figured this could be a bit of fun. Especially cause like i'm so shit at programming that it took my like 4 or 5 tries to get it done the first time and it was like way long after i finished so with this i could like golf the interpreter and it was crazy man got it done real short and in like an afternoon. sorry for rambling i just discovered prolog and it's so fantastic.# use
just download and run, uhhh i forgot to make it a module but i guess you could if you want.
The file included has the predicate main/2 which takes a string and an expression (as defined in the dcg near the top of the file) and suceededs if the expression is the string's lambda calculus fully reducded. The string is required to be fully instantiated otherwise the predicate will not work.