Aca, a functional programming language, and shitty toy
Project description
Aca
Aca, a functional programming language, and shitty toy.
Aca is a toy functional programming language initially inspired by ISWIM. The interpreter is currently written in Python.
Install
$ pip install acalang
Example
- Command line usage
$ cat foo.aca
let main =
dechurch 3
$ aca foo.aca
3
$ aca foo.aca -S
(lambda x: dechurch(x))((lambda x: x)((lambda f: lambda x: (f(f(f(x)))))))
- Lambda calculus
let main =
(\x y f. f x y)
- Sugar for Church numerals
let main = 0
-- This is identical to
{-
let main =
(\x . x)
-}
- Builtin function
dechurch
for trying to decode a natural number
-- Yields no lambdas but value `42` on the screen
let main =
dechurch 42
- Simple module import with
use
$ foo.aca
let foo = 42
$ bar.aca
use foo
let main =
dechurch foo
$ aca bar.aca
42
Already done
- Lambda calculus
- Encoding and decoding of Church numerals
- Local declarations
Goals
- Before
v1.0.0
:- Untyped lambda calculus
- Standard library for basic datatypes and operations
v1.0.0
:- Builtin binary operators
v2.0.0
:- System F
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
acalang-0.3.0.tar.gz
(5.0 kB
view hashes)
Built Distribution
acalang-0.3.0-py3.6.egg
(11.1 kB
view hashes)