diff --git a/test.schala b/test.schala index a4f1aa7..b17edc7 100644 --- a/test.schala +++ b/test.schala @@ -14,6 +14,18 @@ fn main() { there(); can(); be(); multiple(); statements(); per_line(); + #string interpolation + const yolo = "I have ${a + b} people in my house" + + # let expressions ??? not sure if I want this + let a = 10, b = 20, c = 30 in a + b + c + + #list literal + const q = [1,2,3,4] + + #lambda literal ?? maybe? not sure how this should work + q.map(|item| { item * 100 }) + fn yolo(a: MyType, b: YourType): ReturnType { if a == 20 { return "early" @@ -22,6 +34,7 @@ fn main() { sex } + for { # infinite loop } @@ -47,9 +60,20 @@ fn main() { a + b } - #syntax is, I guess, for , where is a bool, or a - # type level alises + # pattern-matching + match { + Some(a) => { + + }, + None => { + + }, + } + + #syntax is, I guess, for , where is a bool, or a + + # type level alises typealias = #declaring types of all stripes @@ -65,11 +89,4 @@ fn main() { fn lug(self, a: Option) } - -type = struct { : ,* } -type = Variant1 | Variant2(type, type) | Variant3 struct { } - - - fuck.map(fn(x) { x + 10 }) - }