Skip to content

Commit

Permalink
couple borgo files
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielle-barnes committed Oct 21, 2024
1 parent 63aace5 commit 0f2a387
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions borgo/hello.brg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
use fmt

fn main() {
let msg = "Hello world"
fmt.Println(msg)
}
15 changes: 15 additions & 0 deletions borgo/map.brg
Original file line number Diff line number Diff line change
@@ -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())
}

0 comments on commit 0f2a387

Please sign in to comment.