yelouafi / create-a-simple-functional-language

Companion code for https://bit.ly/2WCoR0f

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cerate-a-simple-functional-language

Companion code for https://bit.ly/2WCoR0f

Running

The easiest way is to use parcel

parcel index.html

Then you can use _eval in the developper console. Example

_eval("let inc = fn(x: int) => x + 1 in inc(100)");

More features

I'll be adding occasionnally examples for supporting more features. The examples will be in separate branches.

  • boolean types && if construct, also has more operations && priority/associativity (example)

  • record types (example)

  • type inference (using Algorithm W) (example)

  • subtyping (example)

About

Companion code for https://bit.ly/2WCoR0f

License:MIT License


Languages

Language:TypeScript 98.1%Language:HTML 1.9%