https://github.com/phase/obx
Functional prefix programming language for golf or math or anything you want.
https://github.com/phase/obx
Last synced: 12 months ago
JSON representation
Functional prefix programming language for golf or math or anything you want.
- Host: GitHub
- URL: https://github.com/phase/obx
- Owner: phase
- Created: 2016-03-16T21:56:44.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-24T09:41:58.000Z (almost 10 years ago)
- Last Synced: 2025-01-24T22:31:38.462Z (about 1 year ago)
- Language: Java
- Size: 9.77 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# obx
Functional prefix programming language for golf or math or anything you want.
## Short Explanation
Each line is a function, and the last line is executed with the inputs.
Each function takes up to 3 inputs (`x`, `y`, and `z`), and returns the result.
Functions are written in prefix notation, like Pyth.
```
+xy
A1x
```
With an input of `5`, this program would output `6`. Let's learn why.
`+xy` creates a function called _A_ that adds _x_ (the first argument) and _y_ (the second argument).
`A1x` creates a function called _B_ that calls _A_ with `1` and _x_ (the first argument).
The last function created is called with whatever the input is.