fixed compound node
This commit is contained in:
parent
df1b336c7c
commit
21b43af69d
7 changed files with 117 additions and 102 deletions
|
|
@ -1,21 +1,15 @@
|
|||
import std::io;
|
||||
import std;
|
||||
|
||||
i32 main()
|
||||
{
|
||||
[u32] list = [1, 2, 3, 4, 5];
|
||||
|
||||
// iterative loop
|
||||
loop (0.., list) |i, v| {
|
||||
printf("%d\n", i);
|
||||
u32 x = 4;
|
||||
loop x == 3 {
|
||||
u32 b = 3;
|
||||
}
|
||||
|
||||
// conditional loop
|
||||
loop a == 3 {
|
||||
loop (0.., test) |k, i| {
|
||||
|
||||
}
|
||||
u32 b = 3;
|
||||
|
||||
// infinite loop
|
||||
loop {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
u32 sum<T>(T x, T y)
|
||||
{
|
||||
return x + y;
|
||||
}
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
import test;
|
||||
import std;
|
||||
|
||||
i32 main()
|
||||
{
|
||||
print_msg("Hello world!");
|
||||
print("Hello world!\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
import std::io;
|
||||
|
||||
module log {
|
||||
|
||||
void print_msg([u8] msg)
|
||||
{
|
||||
printf("%s\n", msg);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue