let users = [
  { name: "Alice", age: 30, active: true },
  { name: "Bob", age: 25, active: false },
  { name: "Carol", age: 35, active: true }
]

users.len()
users.head()

fun greet_user(user) {
  if user.active {
    "Hello, " + user.name + "!"
  } else {
    user.name + " is inactive"
  }
}

greet_user({ name: "Alice", age: 30, active: true })
greet_user({ name: "Bob", age: 25, active: false })

fun calculate_stats(nums) {
  {
    count: nums.len(),
    sum: nums.sum(),
    first: nums.head()
  }
}

calculate_stats([1, 2, 3, 4, 5])

let result = if 5 > 3 { "success" } else { "failure" }
result