(module main)

(fn immediate_second () -> string
  (index (array string "sun" "moon" "star") 1))

(fn local_pick () -> string
  (let words (array string 3) (array string "red" "green" "blue"))
  (index words 2))

(test "string immediate array index"
  (= (immediate_second) "moon"))

(test "string local array index"
  (= (local_pick) "blue"))

(fn main () -> i32
  (if (= (local_pick) "blue")
    0
    1))
