sunflower/test.foo

28 lines
332 B
Plaintext
Raw Normal View History

2022-07-03 23:13:12 +02:00
print("hello".eq("world"));
2022-07-03 23:13:12 +02:00
print((40 + 2).is_42() == true);
let y = 0;
def test_func(x) {
print(x);
while x < 100 {
print(x);
x = x + 1;
2022-07-04 15:36:03 +02:00
if x > 10 {
return "bar";
}
}
2022-07-04 15:36:03 +02:00
return "foo";
}
2022-07-04 15:36:03 +02:00
def add_one(x) {
x + 1
}
let x = test_func(y);
print(x);
print(add_one(41));