blob: e387cb5160fae55e80be243d7ee2713519135c6d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# Baba Yaga Code Examples
Here's some regular text.
```baba
// This is a comment - should not have type hints
add : Int -> Int -> Int;
add(x, y) : x + y;
// Another comment
result : add(5, 3); // Should show type hint here
name : "World";
greeting : str.concat("Hello, ", name); // Should show type hint
result_check : when result is
8 then "correct"
_ then "wrong";
// Math example
value : math.sqrt(16);
```
More regular markdown text.
```javascript
// This is JavaScript, not Baba Yaga
function test() {
return 42;
}
```
Another Baba Yaga block:
```baba-yaga
// Alternative syntax
list : [1, 2, 3];
doubled : map(x -> x * 2, list);
```
|