mirror of
https://github.com/bearlanguageorg/bear.git
synced 2026-08-26 16:47:01 +00:00
12 lines
149 B
Plaintext
12 lines
149 B
Plaintext
// debug: generic function
|
|
|
|
fn first[T](arr) {
|
|
return arr[0]
|
|
}
|
|
|
|
fn main() {
|
|
let nums = [10, 20, 30]
|
|
let x = first(nums)
|
|
println(x)
|
|
}
|