https://github.com/phase/lamb
The Lamb Programming Language
https://github.com/phase/lamb
Last synced: 8 months ago
JSON representation
The Lamb Programming Language
- Host: GitHub
- URL: https://github.com/phase/lamb
- Owner: phase
- Created: 2015-06-26T21:35:06.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-26T23:34:19.000Z (over 10 years ago)
- Last Synced: 2025-06-12T15:07:15.891Z (9 months ago)
- Language: Java
- Homepage: http://jadonfowler.xyz/lamb
- Size: 156 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#Lamb
Lamb is a interpreted language that revolves around [Lambda Calculus].
Variables are made by putting the variable name, a `:` , and a value
```javascript
hello:“Hello World”
```
Functions are written in Lambda Calculus notation
```javascript
square:λx.x*x
add:λx.λy.x+y
```
Lamb is translated in JavaScript code through a Java ScriptEngine, meaning we can put JS code within our Lamb code
```javascript
power:λx.λy.Math.pow(x,y)
```
To use a function, you can call it variables or other arguments
```javascript
two:2
add(two,3)
```
You can also assign the return of a function to a variable
```javascript
h:2
h:add(h,h)
```
### Hello World
Returned values are printed out, so all we have to do is return the string “Hello World”
```javascript
"Hello World"
```
[Lambda Calculus]: https://en.m.wikipedia.org/wiki/Lambda_calculus