Func is a toy functional programming language.
I'm using this project as an outlet to play around with language design/implementation.
- Basic types:
Integer,String - Functions with partial application
- A command-line REPL (Read-Eval-Print Loop)
The code:
main = print answer
answer = integer_to_string (add1 x)
x = add (add 10 25) (add1 5)
add1 = add 1
prints the line 42 to the standard output.
- Install Python if you haven't already
- Clone the repository
- Open a terminal
- Navigate to the repository folder
- Either:
- Run the REPL:
python -m func - Run a Func file:
python -m func --file <PATH> - Run the tests:
- Navigate to the
testsfolder - Run
python .
- Navigate to the
- Run the REPL: