Developing...
A Modern Functional and Dependent Type Programming Language Base on Rust.
- Modern Syntax
- Functional Programming
- Dependent Types
- The First-Class Type
- Parsing and Type Checking
- Many targets
- Simple, safe and Fast
let foo = 1
// foo = 2 // Error
let foo1 = "Hello, FP!"
let foo2: Char = 'X'
type Bool2 = True | False
let foo3: Bool2 = False
let foo4: Float = 3.1415926
type List: Kind -> Kind = <T> Cons(T, List(T)) | Nil
let String1 = List(Char)
let String2 = [Char]
let fruits: List = Cons("Apple", Cons("Banana", Cons("Pear", Nil)))
let fruits2: [String] = ["Apple", "Banana", "Pear"]
let add: Int -> Int -> Int = (x) => (y) => x + y
let add1: Int -> Int -> Int = (x, y) => x + y
let add2 = (x: Int, y: Int): Int => x + y
// let fibonacii: Int -> Int
// | 1 => 1
// | 2 => 1
// | x => fibonacii(x - 1) + fibonacii(x - 2)
let fibonacii: Int -> Int = (x) =>
match x then
| 1 => 1
| 2 => 1
| x => fibonacii(x - 1) + fibonacii(x - 2)
let handle_score = (x: Int) =>
if x > 100 || x < 0 then "Fake"
else if x == 100 then "Best"
else if x > 90 then "Excellent"
else if x > 70 then "Good"
else if x > 60 then "Not bad"
else if x > 40 then "Bad"
else "Shit"
let bar =
let x = 20 in
let y = 30 in
x + y ^ 2 * 2 / 5 - 5 % 1
let bar2 = {
let x = 20
let y = 30
x + y ^ 2 * 2 / 5 - 5 % 1
}