diff --git a/borgo/hello.brg b/borgo/hello.brg new file mode 100644 index 0000000..811bd1a --- /dev/null +++ b/borgo/hello.brg @@ -0,0 +1,6 @@ +use fmt + +fn main() { + let msg = "Hello world" + fmt.Println(msg) +} diff --git a/borgo/map.brg b/borgo/map.brg new file mode 100644 index 0000000..31ad13c --- /dev/null +++ b/borgo/map.brg @@ -0,0 +1,15 @@ +use fmt + +fn main() { + let m = Map.new() + m.Insert(3, "mice") + m.Insert(5, "cats") + + let mut keys = [] + fmt.Println("For loop over maps") + for (key, value) in m { + fmt.Println(key, value) + keys = keys.Append(key) + } + fmt.Println("Length of key list after adding keys:", keys.Len()) +}