Skip to content

A mini ML like language to be used to in a simple calculator

License

Notifications You must be signed in to change notification settings

ebresafegaga/mini

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mini

Build

A purely functional ML like language with Hindley-Milner type inference.

WIP.

Basic syntax

Let bindings

let a = 10
a : number

let b = [] 
b : List<a>

Function bindings

let f a b = [a, b]

f : a -> a -> List<a>

This is also the same as:

let f = fn a b => [a, b] 

let f = fn a => fn b => [a, b]

f : a -> a -> List<a>

Currying

let g = f 10 

g : number -> List<number>

Recursive definitions

let rec fact n = 
  if n <= 0 then 1 else n * fact (n-1)
  
fact : number -> number 

About

A mini ML like language to be used to in a simple calculator

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages