Skip to content

Latest commit

 

History

History
114 lines (66 loc) · 858 Bytes

File metadata and controls

114 lines (66 loc) · 858 Bytes

Body

PI = a + b + 0.012;

pub mut Pi = 123;

fn(a, b) = a + b;

pub `+`(a, b) = a + b;


one(b) = console.log(b);

pub zero() = a + b;

Imports

version: v1;

import:
    `std/math`,
    `std/math`{`+`};

derive: equals, to_json;

Literals

obj = {
    val = 1,
    val2 = "dfsfd"
};

arr = [
    1,
    2,
    3
];


str = "multiline
dfsakfalf
"


Match

matchExample(v) =
    v match (
        == 1 -> 1,
        == "a string" -> _,
        == -2 -> 2
    )
    + 2;

Rich enum

|   A(
        pub test = "fsldkjf";
    );

|   B(
        val = false;
    );

is syntax

is function

is string

is Type

lambdas

test() =
    arr map (_[0] + 2)

stores / async

test: $string = "df"

test() *string =
    arr map (_[0] + 2)